Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Lower / pre-fir-tree03.f90
blob313dab4d6ec7cec9fb59c502bf3cf82c386298c5
1 ! RUN: %flang_fc1 -fdebug-pre-fir-tree -fopenmp %s | FileCheck %s
3 ! Test Pre-FIR Tree captures OpenMP related constructs
5 ! CHECK: Program test_omp
6 program test_omp
7 ! CHECK: PrintStmt
8 print *, "sequential"
10 ! CHECK: <<OpenMPConstruct>>
11 !$omp parallel
12 ! CHECK: PrintStmt
13 print *, "in omp //"
14 ! CHECK: <<OpenMPConstruct>>
15 !$omp do
16 ! CHECK: <<DoConstruct>>
17 ! CHECK: LabelDoStmt
18 do i=1,100
19 ! CHECK: PrintStmt
20 print *, "in omp do"
21 ! CHECK: EndDoStmt
22 end do
23 ! CHECK: <<End DoConstruct>>
24 ! CHECK: OmpEndLoopDirective
25 !$omp end do
26 ! CHECK: <<End OpenMPConstruct>>
28 ! CHECK: PrintStmt
29 print *, "not in omp do"
31 ! CHECK: <<OpenMPConstruct>>
32 !$omp do
33 ! CHECK: <<DoConstruct>>
34 ! CHECK: LabelDoStmt
35 do i=1,100
36 ! CHECK: PrintStmt
37 print *, "in omp do"
38 ! CHECK: EndDoStmt
39 end do
40 ! CHECK: <<End DoConstruct>>
41 ! CHECK: <<End OpenMPConstruct>>
42 ! CHECK-NOT: OmpEndLoopDirective
43 ! CHECK: PrintStmt
44 print *, "no in omp do"
45 !$omp end parallel
46 ! CHECK: <<End OpenMPConstruct>>
48 ! CHECK: PrintStmt
49 print *, "sequential again"
51 ! CHECK: <<OpenMPConstruct>>
52 !$omp task
53 ! CHECK: PrintStmt
54 print *, "in task"
55 !$omp end task
56 ! CHECK: <<End OpenMPConstruct>>
58 ! CHECK: PrintStmt
59 print *, "sequential again"
60 end program