summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.21.2.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/gomp/appendix-a/a.21.2.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/appendix-a/a.21.2.f9020
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.21.2.f90 b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.21.2.f90
new file mode 100644
index 000000000..87359a152
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.21.2.f90
@@ -0,0 +1,20 @@
+! { dg-do compile }
+
+ SUBROUTINE WORK(I)
+ INTEGER I
+ END SUBROUTINE WORK
+ SUBROUTINE A21_WRONG(N)
+ INTEGER N
+ INTEGER I
+!$OMP DO ORDERED
+ DO I = 1, N
+! incorrect because an iteration may not execute more than one
+! ordered region
+!$OMP ORDERED
+ CALL WORK(I)
+!$OMP END ORDERED
+!$OMP ORDERED
+ CALL WORK(I+1)
+!$OMP END ORDERED
+ END DO
+ END SUBROUTINE A21_WRONG