https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68566
Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jvdelisle at gcc dot gnu.org --- Comment #8 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> --- (In reply to Harald Anlauf from comment #5) --- snip --- > > Index: gcc/fortran/simplify.c > =================================================================== > --- gcc/fortran/simplify.c (revision 234170) > +++ gcc/fortran/simplify.c (working copy) > @@ -5163,6 +5163,9 @@ > || !is_constant_array_expr (order_exp)) > return NULL; > > + if (source->shape == NULL) > + return NULL; > + > /* Proceed with simplification, unpacking the array. */ > > mpz_init (index); > > Although an error is thrown and no ICE, for the cases of comment #1, we get two errors, one of which is bogus. I believe the z2.f90 through z5.f90 need to be caught much earlier in syntax checking