https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114373
Bug ID: 114373 Summary: BLOCK construct not correctly analyzed with -fopenmp Product: gcc Version: 13.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: Jens-Olaf.Beismann at emea dot nec.com Target Milestone: --- Created attachment 57721 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57721&action=edit Test code Following error messages are erroneously issued when compiling with -fopenmp: % gfortran -c -fopenmp tfx.f90 tfx.f90:17:58: 17 | goto_9999 = .TRUE. ; EXIT store_field_critical_0 | 1 Error: EXIT statement at (1) is not within construct 'store_field_critical_0' tfx.f90:27:60: 27 | goto_9999 = .TRUE. ; EXIT store_field_critical_0 | 1 Error: EXIT statement at (1) is not within construct 'store_field_critical_0' tfx.f90:31:34: 31 | END BLOCK store_field_critical_0 | 1 Error: Syntax error in END BLOCK statement at (1) tfx.f90:32:34: 32 | !$OMP END CRITICAL (store_field_0) | 1 Error: Unexpected !$OMP END CRITICAL statement at (1) tfx.f90:37:3: 37 | END SUBROUTINE store_field | 1 Error: Expecting END BLOCK statement at (1) f951: Error: Unexpected end of file in 'tfx.f90' Compilation without OpenMP support or with compiler versions 11.2.0 or earlier works as expected. Test code and compiler version information attached. Thank you and best regards, Jens-Olaf