[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Semantics / OpenMP / omp-do06.f90
blob86790c2930e241c821b421a687882cf169dd3909
1 ! RUN: %python %S/../test_errors.py %s %flang -fopenmp
2 ! OpenMP Version 4.5
3 ! 2.7.1 Loop Construct
4 ! The ordered clause must be present on the loop construct if any ordered
5 ! region ever binds to a loop region arising from the loop construct.
7 program omp_do
8 integer i, j, k
10 !$omp do
11 do i = 1, 10
12 !ERROR: An ORDERED directive without the DEPEND clause must be closely nested in a worksharing-loop (or worksharing-loop SIMD) region with ORDERED clause without the parameter
13 !$omp ordered
14 call my_func()
15 !$omp end ordered
16 end do
17 !$omp end do
19 !$omp do ordered private(i)
20 do i = 1, 10
21 !$omp parallel do
22 do j = 1, 10
23 print *,i
24 !ERROR: An ORDERED directive without the DEPEND clause must be closely nested in a worksharing-loop (or worksharing-loop SIMD) region with ORDERED clause without the parameter
25 !$omp ordered
26 print *,i
27 !$omp end ordered
28 end do
29 !$omp end parallel do
30 end do
31 !$omp end do
33 end program omp_do