diff options
Diffstat (limited to 'gcc/fortran/match.c')
| -rw-r--r-- | gcc/fortran/match.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index 865781f..81bbb23 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -3024,6 +3024,11 @@ match_case_eos (void) if (gfc_match_eos () == MATCH_YES) return MATCH_YES; + /* If the case construct doesn't have a case-construct-name, we + should have matched the EOS. */ + if (!gfc_current_block ()) + return MATCH_ERROR; + gfc_gobble_whitespace (); m = gfc_match_name (name); |
