summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.33.4.f90
blob: 9685b5939c81575aeaea22a734fa502c10bea527 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
! { dg-do compile }
        SUBROUTINE S(N)
        INTEGER N
        REAL, DIMENSION(:), ALLOCATABLE :: A
        REAL, DIMENSION(:), POINTER :: B
        ALLOCATE (A(N))
!$OMP SINGLE            ! { dg-error "COPYPRIVATE clause object 'a'" }
            ALLOCATE (B(N))
        READ (11) A,B
!$OMP END SINGLE COPYPRIVATE(A,B)
        ! Variable A designates a private object
        !   which has the same value in each thread
        ! Variable B designates a shared object
!$OMP BARRIER
!$OMP SINGLE
          DEALLOCATE (B)
!$OMP END SINGLE NOWAIT
      END SUBROUTINE S