https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103505
kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org Priority|P3 |P4 --- Comment #2 from kargl at gcc dot gnu.org --- diff --git a/gcc/fortran/array.c b/gcc/fortran/array.c index 6552eaf3b0c..1b2f5b310a7 100644 --- a/gcc/fortran/array.c +++ b/gcc/fortran/array.c @@ -492,6 +492,9 @@ match_array_element_spec (gfc_array_spec *as) if (!gfc_expr_check_typed (*upper, gfc_current_ns, false)) return AS_UNKNOWN; + if ((*upper)->expr_type != EXPR_CONSTANT) + gfc_simplify_expr (*upper,0); + if (((*upper)->expr_type == EXPR_CONSTANT && (*upper)->ts.type != BT_INTEGER) || ((*upper)->expr_type == EXPR_FUNCTION