summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.32.1.f90
blob: 498a6d324a6bf6cc10c5b5eb876fcbfbb551fa01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
! { dg-do compile }
! { dg-require-effective-target tls }

      MODULE M
        REAL, POINTER, SAVE :: WORK(:)
        INTEGER :: SIZE
        REAL :: TOL
!$OMP THREADPRIVATE(WORK,SIZE,TOL)
      END MODULE M
      SUBROUTINE A32( T, N )
        USE M
        REAL :: T
        INTEGER :: N
        TOL = T
        SIZE = N
!$OMP PARALLEL COPYIN(TOL,SIZE)
        CALL BUILD
!$OMP END PARALLEL
      END SUBROUTINE A32
      SUBROUTINE BUILD
        USE M
        ALLOCATE(WORK(SIZE))
        WORK = TOL
      END SUBROUTINE BUILD
! { dg-final { cleanup-modules "M" } }