[WebAssembly] Fix asan issue from https://reviews.llvm.org/D121349
[llvm-project.git] / flang / test / Semantics / omp-do-ordered-positivecases.f90
blobe2f9ec085f78b34387d82363cdf518398b669bd8
1 !RUN: %python %S/test_errors.py %s %flang -fopenmp
2 ! OpenMP Version 4.5
3 ! 2.7.1 Ordered Clause positive cases.
5 !DEF: /omp_doordered MainProgram
6 program omp_doordered
7 !DEF: /omp_doordered/i ObjectEntity INTEGER(4)
8 !DEF: /omp_doordered/j ObjectEntity INTEGER(4)
9 integer i, j
10 !$omp do ordered(2)
11 !DEF: /omp_doordered/Block1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
12 do i=1,10
13 !DEF: /omp_doordered/Block1/j (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
14 do j=1,10
15 print *, "hello"
16 end do
17 end do
18 !$omp end do
20 !REF: /omp_doordered/i
21 do i=1,10
22 !REF: /omp_doordered/j
23 do j=1,10
24 !$omp do ordered(1)
25 !DEF: /omp_doordered/Block2/k (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
26 do k=1,10
27 print *, "hello"
28 end do
29 !$omp end do
30 end do
31 end do
33 !$omp do ordered(1)
34 !DEF: /omp_doordered/Block3/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
35 do i=1,10
36 !$omp ordered
37 !REF: /omp_doordered/j
38 do j=1,10
39 print *, "hello"
40 end do
41 !$omp end ordered
42 end do
43 !$omp end do
45 !$omp do collapse(1) ordered(2)
46 !DEF: /omp_doordered/Block4/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
47 do i=1,10
48 !DEF: /omp_doordered/Block4/j (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
49 do j=1,10
50 print *, "hello"
51 end do
52 end do
53 !$omp end do
55 !$omp parallel num_threads(4)
56 !$omp do ordered(1) collapse(1)
57 !DEF: /omp_doordered/Block5/Block1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
58 do i=1,10
59 !$omp ordered
60 !DEF: /omp_doordered/Block5/j (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
61 do j=1,10
62 print *, "hello"
63 end do
64 !$omp end ordered
65 end do
66 !$omp end parallel
67 end program omp_doordered