+2020-04-19 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/93500
+ * resolve.c (resolve_operator): If both operands are
+ NULL, return false.
+ * simplify.c (simplify_bound): If a division by zero
+ was seen during bound simplification, free the
+ corresponcing expression and return &gfc_bad_expr.
+
2020-04-17 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/94090
--- /dev/null
+! { dg-do compile }
+! { dg-options "-fcoarray=single" }
+! PR 93500 - this used to cause an ICE
+
+program p
+ integer :: a(min(2,0)/0) ! { dg-error "Division by zero" }
+ integer, save :: c[min(2,0)/0,*] ! { dg-error "Division by zero|must have constant shape" }
+ integer :: b = lbound(a) ! { dg-error "must be an array" }
+ print *,lcobound(c)
+end program p
+
+subroutine s
+ integer :: a(min(2,0)/0) ! { dg-error "Division by zero" }
+ integer, save :: c[min(2,0)/0,*] ! { dg-error "Division by zero" }
+ integer :: b = lbound(a)
+ print *,lcobound(c)
+end subroutine s