From: Andre Vehreschild Date: Tue, 13 Aug 2024 13:06:56 +0000 (+0200) Subject: Prevent future proc_ptr parsing issues in associate [PR102973] X-Git-Tag: basepoints/gcc-16~6642 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=54be14bfd6e2dee7cb4e1b3c20dc2677093ee818;p=thirdparty%2Fgcc.git Prevent future proc_ptr parsing issues in associate [PR102973] A global variable is set when proc_ptr parsing in an associate is expected. In the case of an error, that flag was not reset, which is fixed now. gcc/fortran/ChangeLog: PR fortran/102973 * match.cc (gfc_match_associate): Reset proc_ptr parsing flag on error. --- diff --git a/gcc/fortran/match.cc b/gcc/fortran/match.cc index 1851a8f94a5..e4b60bf5f68 100644 --- a/gcc/fortran/match.cc +++ b/gcc/fortran/match.cc @@ -1932,6 +1932,7 @@ gfc_match_associate (void) gfc_matching_procptr_assignment = 1; if (gfc_match (" %e", &newAssoc->target) != MATCH_YES) { + gfc_matching_procptr_assignment = 0; gfc_error ("Invalid association target at %C"); goto assocListError; }