diff options
Diffstat (limited to 'gcc/fortran/primary.c')
-rw-r--r-- | gcc/fortran/primary.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c index 77522e5..78c24d4 100644 --- a/gcc/fortran/primary.c +++ b/gcc/fortran/primary.c @@ -2367,6 +2367,13 @@ build_actual_constructor (gfc_structure_ctor_component **comp_head, return false; value = gfc_copy_expr (comp->initializer); } + else if (comp->attr.allocatable) + { + if (!gfc_notify_std (GFC_STD_F2008, "No initializer for " + "allocatable component '%s' given in the structure " + "constructor at %C", comp->name)) + return false; + } else if (!comp->attr.deferred_parameter) { gfc_error ("No initializer for component %qs given in the" |