[WebAssembly] Fix asan issue from https://reviews.llvm.org/D121349
[llvm-project.git] / flang / test / Semantics / omp-do06.f90
blob1374e6357585ca823e7d4e20ab50b1f33ca44251
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: The ORDERED clause must be present on the loop construct if any ORDERED region ever binds to a loop region arising from the loop construct.
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: The ORDERED clause must be present on the loop construct if any ORDERED region ever binds to a loop region arising from the loop construct.
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