summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.33.2.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/gomp/appendix-a/a.33.2.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/appendix-a/a.33.2.f9017
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.33.2.f90 b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.33.2.f90
new file mode 100644
index 000000000..ced23c856
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.33.2.f90
@@ -0,0 +1,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