Message ID | 20240119174736.1434406-1-mikael@gcc.gnu.org |
---|---|
State | New |
Headers | show |
Series | fortran: Restore current interface info on error [PR111291] | expand |
On Fri, Jan 19, 2024 at 06:47:36PM +0100, Mikael Morin wrote: > > I tested this on x86_64-pc-linux-gnu without regression. > There is no new test, as the problem is visible on an > existing test with valgrind or an asan-instrumented compiler. > OK for master? > Yes. After your explanation, the patch looks trivially obvious! :-) Thanks for the patch.
diff --git a/gcc/fortran/parse.cc b/gcc/fortran/parse.cc index abd3a424f38..51e89e10e2d 100644 --- a/gcc/fortran/parse.cc +++ b/gcc/fortran/parse.cc @@ -4033,6 +4033,7 @@ loop: default: gfc_error ("Unexpected %s statement in INTERFACE block at %C", gfc_ascii_statement (st)); + current_interface = save; reject_statement (); gfc_free_namespace (gfc_current_ns); goto loop;