diff options
Diffstat (limited to 'gcc/fortran/primary.c')
-rw-r--r-- | gcc/fortran/primary.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c index cbe7aa60e7b..141f8cc1ed6 100644 --- a/gcc/fortran/primary.c +++ b/gcc/fortran/primary.c @@ -1857,7 +1857,10 @@ gfc_match_varspec (gfc_expr *primary, int equiv_flag, bool sub_flag, Thus if we have one and parentheses follow, we have to assume that it actually is one for now. The final decision will be made at resolution time, of course. */ - if (sym->assoc && gfc_peek_ascii_char () == '(') + if (sym->assoc && gfc_peek_ascii_char () == '(' + && !(sym->assoc->dangling && sym->assoc->st + && sym->assoc->st->n.sym + && sym->assoc->st->n.sym->attr.dimension == 0)) sym->attr.dimension = 1; if ((equiv_flag && gfc_peek_ascii_char () == '(') |