https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88552
anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|2018-12-19 00:00:00 |2023-5-31 CC| |anlauf at gcc dot gnu.org --- Comment #3 from anlauf at gcc dot gnu.org --- I'm testing the following patch: diff --git a/gcc/fortran/decl.cc b/gcc/fortran/decl.cc index 1de2b231242..2162b62608a 100644 --- a/gcc/fortran/decl.cc +++ b/gcc/fortran/decl.cc @@ -3366,6 +3372,7 @@ close_brackets: else gfc_error ("Missing right parenthesis at %C"); m = MATCH_ERROR; + goto no_match; } else /* All tests passed. */ @@ -4716,6 +4723,9 @@ get_kind: return MATCH_ERROR; } + if (m == MATCH_ERROR) + return MATCH_ERROR; + /* Defer association of the KIND expression of function results until after USE and IMPORT statements. */ if ((gfc_current_state () == COMP_NONE && gfc_error_flag_test ())