diff options
Diffstat (limited to 'gcc/fortran/match.c')
-rw-r--r-- | gcc/fortran/match.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index b51d18a..c064135 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -5456,7 +5456,10 @@ gfc_match_type_is (void) c = gfc_get_case (); c->where = gfc_current_locus; - if (gfc_match_type_spec (&c->ts) == MATCH_ERROR) + m = gfc_match_type_spec (&c->ts); + if (m == MATCH_NO) + goto syntax; + if (m == MATCH_ERROR) goto cleanup; if (gfc_match_char (')') != MATCH_YES) @@ -5536,7 +5539,10 @@ gfc_match_class_is (void) c = gfc_get_case (); c->where = gfc_current_locus; - if (match_derived_type_spec (&c->ts) == MATCH_ERROR) + m = match_derived_type_spec (&c->ts); + if (m == MATCH_NO) + goto syntax; + if (m == MATCH_ERROR) goto cleanup; if (c->ts.type == BT_DERIVED) |