https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95654
--- Comment #12 from Tom de Vries <vries at gcc dot gnu.org> --- (In reply to Tom de Vries from comment #7) > Minimal example after commit 91347c3bbf7 "Fortran: OpenMP - fix simd with > (last)private (PR97061)": > ... > ! { dg-do run } > > program main > implicit none > integer :: d1 > !$omp target map(from: d1) > > !$omp teams distribute parallel do simd default(none) lastprivate(d1) > > do d1 = 0, 31 > end do > !$omp end target > > if (d1 /= 32) stop 3 > end program > ... To further reduce: set num_teams to 2, and num_threads to 1: ... !$omp teams distribute parallel do simd default(none) lastprivate(d1) num_teams (2) num_threads (1) ... Makes it easier to reason about the code.