diff options
Diffstat (limited to 'gcc/fortran/match.c')
-rw-r--r-- | gcc/fortran/match.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index 29437c3..74f26b7 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -4365,16 +4365,6 @@ gfc_match_common (void) goto cleanup; } - sym->common_block = t; - sym->common_block->refs++; - - if (tail != NULL) - tail->common_next = sym; - else - *head = sym; - - tail = sym; - /* Deal with an optional array specification after the symbol name. */ m = gfc_match_array_spec (&as, true, true); @@ -4409,6 +4399,16 @@ gfc_match_common (void) if any, and continue matching. */ gfc_add_in_common (&sym->attr, sym->name, NULL); + sym->common_block = t; + sym->common_block->refs++; + + if (tail != NULL) + tail->common_next = sym; + else + *head = sym; + + tail = sym; + sym->common_head = t; /* Check to see if the symbol is already in an equivalence group. |