1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
! PR fortran/32550 ! { dg-do run } ! { dg-require-effective-target tls_runtime } integer, pointer, save :: ptr integer, target :: targ integer :: e !$omp threadprivate(ptr) e = 0 targ = 42 !$omp parallel shared(targ) !$omp single ptr => targ !$omp end single copyprivate(ptr) if (ptr.ne.42) then !$omp atomic e = e + 1 end if !$omp end parallel if (e.ne.0) call abort end