aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.2.1-5666.3/libgomp/testsuite/libgomp.fortran/appendix-a/a.15.1.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.2.1-5666.3/libgomp/testsuite/libgomp.fortran/appendix-a/a.15.1.f90')
-rw-r--r--gcc-4.2.1-5666.3/libgomp/testsuite/libgomp.fortran/appendix-a/a.15.1.f9031
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc-4.2.1-5666.3/libgomp/testsuite/libgomp.fortran/appendix-a/a.15.1.f90 b/gcc-4.2.1-5666.3/libgomp/testsuite/libgomp.fortran/appendix-a/a.15.1.f90
new file mode 100644
index 000000000..3d95451ea
--- /dev/null
+++ b/gcc-4.2.1-5666.3/libgomp/testsuite/libgomp.fortran/appendix-a/a.15.1.f90
@@ -0,0 +1,31 @@
+! { dg-do compile }
+ SUBROUTINE WORK(N)
+ INTEGER N
+ END SUBROUTINE WORK
+ SUBROUTINE SUB3(N)
+ INTEGER N
+ CALL WORK(N)
+!$OMP BARRIER
+ CALL WORK(N)
+ END SUBROUTINE SUB3
+ SUBROUTINE SUB2(K)
+ INTEGER K
+!$OMP PARALLEL SHARED(K)
+ CALL SUB3(K)
+!$OMP END PARALLEL
+ END SUBROUTINE SUB2
+ SUBROUTINE SUB1(N)
+ INTEGER N
+ INTEGER I
+!$OMP PARALLEL PRIVATE(I) SHARED(N)
+!$OMP DO
+ DO I = 1, N
+ CALL SUB2(I)
+ END DO
+!$OMP END PARALLEL
+ END SUBROUTINE SUB1
+ PROGRAM A15
+ CALL SUB1(2)
+ CALL SUB2(2)
+ CALL SUB3(2)
+ END PROGRAM A15