Message ID | 411a8b42-33f8-4aab-f46f-8172a6e5424c@netcologne.de |
---|---|
State | New |
Headers | show |
Series | [committed] Fix for PR 91800 | expand |
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index b3ed63c97cc..d650407da41 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -2903,6 +2903,15 @@ variable_decl (int elem) 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; + } + if (gfc_current_state () == COMP_DERIVED && gfc_current_block ()->attr.pdt_template) {