summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.33.2.f90
blob: ced23c856b4d87142ffbaa3d1f7dda536a29f03b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
! { dg-do compile }

      REAL FUNCTION READ_NEXT()
        REAL, POINTER :: TMP
!$OMP SINGLE
          ALLOCATE (TMP)
!$OMP END SINGLE COPYPRIVATE (TMP) ! copies the pointer only
!$OMP MASTER
          READ (11) TMP
!$OMP END MASTER
!$OMP BARRIER
          READ_NEXT = TMP
!$OMP BARRIER
!$OMP SINGLE
          DEALLOCATE (TMP)
!$OMP END SINGLE NOWAIT
      END FUNCTION READ_NEXT