blob: 7a9e1840b2445290977571ddb4c5845fd38ced5e (
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
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
|