This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/77506] stamdard for f2008 does not allow CHARACTER(LEN=*) in array constructor


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)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]