2022-04-18 15:02:25 -07:00

26 lines
509 B
Fortran

! @@name: copyprivate.2
! @@type: F-fixed
! @@compilable: yes
! @@linkable: no
! @@expect: success
! @@version: omp_5.1
REAL FUNCTION READ_NEXT()
REAL, POINTER :: TMP
!$OMP SINGLE
ALLOCATE (TMP)
!$OMP END SINGLE COPYPRIVATE (TMP) ! copies the pointer only
!$OMP MASKED
READ (11) TMP
!$OMP END MASKED
!$OMP BARRIER
READ_NEXT = TMP
!$OMP BARRIER
!$OMP SINGLE
DEALLOCATE (TMP)
!$OMP END SINGLE NOWAIT
END FUNCTION READ_NEXT