IR: de-duplicate two CmpInst routines (NFC) (#116866)
[llvm-project.git] / flang / test / Lower / pre-fir-tree06.f90
blobf84bcd8b58b2d9eb6c54b7ead127419924ece5ac
1 ! RUN: %flang_fc1 -fdebug-pre-fir-tree -fopenmp %s | FileCheck %s
3 ! Test structure of the Pre-FIR tree with OpenMP declarative construct
5 ! CHECK: Module m
6 module m
7 real, dimension(10) :: x
8 ! CHECK-NEXT: OpenMPDeclarativeConstruct
9 !$omp threadprivate(x)
10 end
11 ! CHECK: End Module m
13 ! CHECK: Module m2
14 module m2
15 integer, save :: i
16 ! CHECK-NEXT: OpenMPDeclarativeConstruct
17 !$omp threadprivate(i)
18 contains
19 subroutine sub()
20 i = 1;
21 end
22 subroutine sub2()
23 i = 2;
24 end
25 end
26 ! CHECK: End Module m2
28 ! CHECK: Program main
29 program main
30 real :: y
31 ! CHECK-NEXT: OpenMPDeclarativeConstruct
32 !$omp threadprivate(y)
33 end
34 ! CHECK: End Program main
36 ! CHECK: Subroutine sub1
37 subroutine sub1()
38 real, save :: p
39 ! CHECK-NEXT: OpenMPDeclarativeConstruct
40 !$omp threadprivate(p)
41 end
42 ! CHECK: End Subroutine sub1
44 ! CHECK: Subroutine sub2
45 subroutine sub2()
46 real, save :: q
47 ! CHECK-NEXT: OpenMPDeclarativeConstruct
48 !$omp threadprivate(q)
49 contains
50 subroutine sub()
51 end
52 end
53 ! CHECK: End Subroutine sub2