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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #1 from kargl at gcc dot gnu.org ---
Index: array.c
===================================================================
--- array.c     (revision 239797)
+++ array.c     (working copy)
@@ -1089,6 +1089,7 @@ match_array_cons_element (gfc_constructo
@@ -1141,6 +1142,15 @@ gfc_match_array_constructor (gfc_expr **
              gfc_restore_last_undo_checkpoint ();
              goto cleanup;
            }
+
+         if (ts.type == BT_CHARACTER
+            && ts.u.cl && !ts.u.cl->length && !ts.u.cl->length_from_typespec)
+           {
+             gfc_error ("Type-spec at %L cannot contain an asterick for a "
+                        "type parameter", &where);
+             gfc_restore_last_undo_checkpoint ();
+             goto cleanup;
+           }
        }
     }
   else if (m == MATCH_ERROR)

Reply via email to