Retro68/gcc/libgomp/testsuite/libgomp.fortran/pr32550.f90
Wolfgang Thaller aaf905ce07 add gcc 4.70
2012-03-28 01:13:14 +02:00

22 lines
434 B
Fortran

! 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