Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / OpenMP / do12.f90
bloba057a246f7a9995de3129128546e068d431f19df
1 ! RUN: %python %S/../test_symbols.py %s %flang_fc1 -fopenmp
2 ! OpenMP Version 4.5
3 ! 2.7.1 Do Loop constructs.
5 !DEF: /omp_cycle MainProgram
6 program omp_cycle
7 !$omp do collapse(1)
8 !DEF: /omp_cycle/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
9 do i=0,10
10 !REF: /omp_cycle/OtherConstruct1/i
11 if (i<1) cycle
12 !DEF: /omp_cycle/j (Implicit) ObjectEntity INTEGER(4)
13 do j=0,10
14 !DEF: /omp_cycle/k (Implicit) ObjectEntity INTEGER(4)
15 do k=0,10
16 !REF: /omp_cycle/OtherConstruct1/i
17 !REF: /omp_cycle/j
18 !REF: /omp_cycle/k
19 print *, i, j, k
20 end do
21 end do
22 end do
23 !$omp end do
25 !$omp do collapse(1)
26 !DEF: /omp_cycle/OtherConstruct2/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
27 do i=0,10
28 !REF: /omp_cycle/j
29 do j=0,10
30 !REF: /omp_cycle/OtherConstruct2/i
31 if (i<1) cycle
32 !REF: /omp_cycle/k
33 do k=0,10
34 !REF: /omp_cycle/OtherConstruct2/i
35 !REF: /omp_cycle/j
36 !REF: /omp_cycle/k
37 print *, i, j, k
38 end do
39 end do
40 end do
41 !$omp end do
43 !$omp do collapse(2)
44 !DEF: /omp_cycle/OtherConstruct3/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
45 do i=0,10
46 !DEF: /omp_cycle/OtherConstruct3/j (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
47 do j=0,10
48 !REF: /omp_cycle/k
49 do k=0,10
50 !REF: /omp_cycle/OtherConstruct3/i
51 if (i<1) cycle
52 !REF: /omp_cycle/OtherConstruct3/i
53 !REF: /omp_cycle/OtherConstruct3/j
54 !REF: /omp_cycle/k
55 print *, i, j, k
56 end do
57 end do
58 end do
59 !$omp end do
61 !$omp do collapse(3)
62 !DEF: /omp_cycle/OtherConstruct4/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
63 do i=0,10
64 !DEF: /omp_cycle/OtherConstruct4/j (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
65 do j=0,10
66 !DEF: /omp_cycle/OtherConstruct4/k (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
67 do k=0,10
68 !REF: /omp_cycle/OtherConstruct4/i
69 if (i<1) cycle
70 !REF: /omp_cycle/OtherConstruct4/i
71 !REF: /omp_cycle/OtherConstruct4/j
72 !REF: /omp_cycle/OtherConstruct4/k
73 print *, i, j, k
74 end do
75 end do
76 end do
77 !$omp end do
79 !$omp do collapse(3)
80 !DEF: /omp_cycle/OtherConstruct5/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
81 foo:do i=0,10
82 !DEF: /omp_cycle/OtherConstruct5/j (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
83 foo1:do j=0,10
84 !DEF: /omp_cycle/OtherConstruct5/k (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
85 foo2:do k=0,10
86 !REF: /omp_cycle/OtherConstruct5/i
87 if (i<1) cycle foo2
88 !REF: /omp_cycle/OtherConstruct5/i
89 !REF: /omp_cycle/OtherConstruct5/j
90 !REF: /omp_cycle/OtherConstruct5/k
91 print *, i, j, k
92 end do foo2
93 end do foo1
94 end do foo
95 !$omp end do
96 end program omp_cycle