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

kargl at gcc dot gnu.org changed:

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

--- Comment #3 from kargl at gcc dot gnu.org ---
Patch is against svn r280157.

Index: gcc/fortran/decl.c
===================================================================
--- gcc/fortran/decl.c  (revision 280157)
+++ gcc/fortran/decl.c  (working copy)
@@ -2879,6 +2880,15 @@ variable_decl (int elem)
     {
       gfc_error ("Initialization of allocatable component at %C is not "
                 "allowed");
+      m = MATCH_ERROR;
+      goto cleanup;
+    }
+
+  if (gfc_current_state () == COMP_DERIVED
+      && initializer && initializer->ts.type == BT_HOLLERITH)
+    {
+      gfc_error ("Initialization of structure component with a HOLLERITH "
+                "constant at %L is not allowed", &initializer->where);
       m = MATCH_ERROR;
       goto cleanup;
     }

Reply via email to