diff options
Diffstat (limited to 'gcc/fortran/array.c')
-rw-r--r-- | gcc/fortran/array.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/fortran/array.c b/gcc/fortran/array.c index 276737b..2355a98 100644 --- a/gcc/fortran/array.c +++ b/gcc/fortran/array.c @@ -1080,7 +1080,8 @@ gfc_match_array_constructor (gfc_expr **result) /* Try to match an optional "type-spec ::" */ gfc_clear_ts (&ts); gfc_new_undo_checkpoint (changed_syms); - if (gfc_match_type_spec (&ts) == MATCH_YES) + m = gfc_match_type_spec (&ts); + if (m == MATCH_YES) { seen_ts = (gfc_match (" ::") == MATCH_YES); @@ -1102,6 +1103,11 @@ gfc_match_array_constructor (gfc_expr **result) } } } + else if (m == MATCH_ERROR) + { + gfc_restore_last_undo_checkpoint (); + goto cleanup; + } if (seen_ts) gfc_drop_last_undo_checkpoint (); |