aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r--gcc/fortran/decl.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index b3ed63c..d650407 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -2904,6 +2904,15 @@ variable_decl (int elem)
}
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)
{
gfc_symbol *param;