Comment 5 for bug 1842164

Revision history for this message
In , Anlauf-o (anlauf-o) wrote :

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 ())