aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/data.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/data.c')
-rw-r--r--gcc/fortran/data.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/fortran/data.c b/gcc/fortran/data.c
index 0d04d65..16cd899 100644
--- a/gcc/fortran/data.c
+++ b/gcc/fortran/data.c
@@ -289,6 +289,14 @@ gfc_assign_data_value (gfc_expr *lvalue, gfc_expr *rvalue, mpz_t index)
switch (ref->type)
{
case REF_ARRAY:
+ if (ref->u.ar.as->rank == 0)
+ {
+ gcc_assert (ref->u.ar.as->corank > 0);
+ if (init == NULL)
+ gfc_free (expr);
+ continue;
+ }
+
if (init && expr->expr_type != EXPR_ARRAY)
{
gfc_error ("'%s' at %L already is initialized at %L",