https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101327
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kargl at gcc dot gnu.org
Ever confirmed|0 |1
Last reconfirmed| |2021-07-06
Status|UNCONFIRMED |NEW
--- Comment #1 from kargl at gcc dot gnu.org ---
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
index b11ae7ce5c5..d370fba9616 100644
--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -1351,8 +1351,13 @@ find_array_element (gfc_constructor_base base,
gfc_array_ref *ar,
goto depart;
}
- gcc_assert (ar->as->upper[i]->expr_type == EXPR_CONSTANT
- && ar->as->lower[i]->expr_type == EXPR_CONSTANT);
+ if (ar->as->upper[i]->expr_type != EXPR_CONSTANT
+ || ar->as->lower[i]->expr_type != EXPR_CONSTANT)
+ {
+ t = false;
+ cons = NULL;
+ goto depart;
+ }
/* Check the bounds. */
if ((ar->as->upper[i]