https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83874

--- Comment #4 from Harald Anlauf <anlauf at gmx dot de> ---
The following obvious patch fixes the ICE:

Index: gcc/fortran/decl.c
===================================================================
--- gcc/fortran/decl.c  (revision 256671)
+++ gcc/fortran/decl.c  (working copy)
@@ -1718,7 +1718,7 @@
                    }
                  else if (init->expr_type == EXPR_ARRAY)
                    {
-                     if (init->ts.u.cl)
+                     if (init->ts.u.cl && init->ts.u.cl->length)
                        {
                          const gfc_expr *length = init->ts.u.cl->length;
                          if (length->expr_type != EXPR_CONSTANT)

Needs regtesting, though.

Reply via email to