mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-24 11:24:05 +08:00
2ada56f5a0
* 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
27 lines
680 B
Fortran
27 lines
680 B
Fortran
! { dg-do run }
|
|
! { dg-require-effective-target tls_runtime }
|
|
MODULE A22_MODULE8
|
|
REAL, POINTER :: WORK(:)
|
|
SAVE WORK
|
|
!$OMP THREADPRIVATE(WORK)
|
|
END MODULE A22_MODULE8
|
|
SUBROUTINE SUB1(N)
|
|
USE A22_MODULE8
|
|
!$OMP PARALLEL PRIVATE(THE_SUM)
|
|
ALLOCATE(WORK(N))
|
|
CALL SUB2(THE_SUM)
|
|
WRITE(*,*)THE_SUM
|
|
!$OMP END PARALLEL
|
|
END SUBROUTINE SUB1
|
|
SUBROUTINE SUB2(THE_SUM)
|
|
USE A22_MODULE8
|
|
WORK(:) = 10
|
|
THE_SUM=SUM(WORK)
|
|
END SUBROUTINE SUB2
|
|
PROGRAM A22_8_GOOD
|
|
N = 10
|
|
CALL SUB1(N)
|
|
END PROGRAM A22_8_GOOD
|
|
|
|
! { dg-final { cleanup-modules "a22_module8" } }
|