https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108382
--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-15 branch has been updated by Paul Thomas <[email protected]>: https://gcc.gnu.org/g:5d5b17d12bbc9840b79d2aea9d7eef8fc9855332 commit r15-11073-g5d5b17d12bbc9840b79d2aea9d7eef8fc9855332 Author: Christopher Albert <[email protected]> Date: Sun Mar 22 07:15:44 2026 +0100 fortran: Fix free-form mixed OpenACC/OpenMP continuation state Clear the opposite directive flag only for fresh free-form OpenMP/OpenACC sentinel lines so continued directives do not leak OpenACC/OpenMP state into the next independent directive. PR fortran/108382 gcc/fortran/ChangeLog: * scanner.cc (skip_free_oacc_sentinel): Clear openmp_flag only for fresh OpenACC directive lines. (skip_free_omp_sentinel): Clear openacc_flag only for fresh OpenMP directive lines. gcc/testsuite/ChangeLog: * gfortran.dg/goacc/omp-108382.f90: New test. Signed-off-by: Christopher Albert <[email protected]> (cherry picked from commit 3d4039e95d851b8543884962ecf1a8e9e20669a8)
