https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108382

--- Comment #9 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Paul Thomas <[email protected]>:

https://gcc.gnu.org/g:f7788ef0c2dbb921c6d5562d9bbe2f7549559f47

commit r14-12520-gf7788ef0c2dbb921c6d5562d9bbe2f7549559f47
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)

Reply via email to