gcc/libgomp/testsuite/libgomp.fortran/threadprivate1.f90
Jakub Jelinek 2ada56f5a0 a.22.8.f90: Add dg-final cleanup-modules line.
* testsuite/libgomp.fortran/appendix-a/a.22.8.f90: Add
	dg-final cleanup-modules line.
	* testsuite/libgomp.fortran/appendix-a/a.40.1.f90: Likewise.
	* testsuite/libgomp.fortran/appendix-a/a.31.5.f90: Likewise.
	* testsuite/libgomp.fortran/appendix-a/a.31.4.f90: Likewise.
	* testsuite/libgomp.fortran/threadprivate2.f90: Likewise.
	* testsuite/libgomp.fortran/reduction5.f90: Likewise.
	* testsuite/libgomp.fortran/threadprivate3.f90: Likewise.
	* testsuite/libgomp.fortran/threadprivate1.f90: Likewise.

From-SVN: r123116
2007-03-21 20:43:14 +01:00

22 lines
475 B
Fortran

! { dg-do run }
! { dg-require-effective-target tls_runtime }
module threadprivate1
double precision :: d
!$omp threadprivate (d)
end module threadprivate1
!$ use omp_lib
use threadprivate1
logical :: l
l = .false.
!$omp parallel num_threads (4) reduction (.or.:l)
d = omp_get_thread_num () + 6.5
!$omp barrier
if (d .ne. omp_get_thread_num () + 6.5) l = .true.
!$omp end parallel
if (l) call abort ()
end
! { dg-final { cleanup-modules "threadprivate1" } }