diff options
author | Steven G. Kargl <kargl@gcc.gnu.org> | 2019-08-02 21:28:58 +0000 |
---|---|---|
committer | Steven G. Kargl <kargl@gcc.gnu.org> | 2019-08-02 21:28:58 +0000 |
commit | e6938b986e59813cf1c8345d0bd9851f09518261 (patch) | |
tree | aab4e8b4c4725c1c15e740e83574f33fa5c810ea /gcc/fortran/match.c | |
parent | 5440f245c8f2527ec309b20d580c1b4e5ae8898f (diff) | |
download | gcc-e6938b986e59813cf1c8345d0bd9851f09518261.zip gcc-e6938b986e59813cf1c8345d0bd9851f09518261.tar.gz gcc-e6938b986e59813cf1c8345d0bd9851f09518261.tar.bz2 |
re PR fortran/90297 (gcc/fortran/resolve.c: 2 * possibly redundant code ?)
2019-08-02 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/90297
* match.c (gfc_match_equivalence): Check that EQUIVALENCE is followed
by '('.
2019-08-02 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/90297
* gfortran.dg/equiv_10.f90: New test.
From-SVN: r274031
Diffstat (limited to 'gcc/fortran/match.c')
-rw-r--r-- | gcc/fortran/match.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index 0f3b213..5377e93 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -5552,6 +5552,15 @@ gfc_match_equivalence (void) gfc_common_head *common_head = NULL; bool common_flag; int cnt; + char c; + + /* EQUIVALENCE has been matched. After gobbling any possible whitespace, + the next character needs to be '('. Check that here, and return + MATCH_NO for a variable of the form equivalencej. */ + gfc_gobble_whitespace (); + c = gfc_peek_ascii_char (); + if (c != '(') + return MATCH_NO; tail = NULL; |