[LLVM] Fix Maintainers.md formatting (NFC)
[llvm-project.git] / flang / test / Lower / pre-fir-tree09.f90
blob15d7672725ab5b550e6191bb4d784b10c9604804
1 ! RUN: bbc -pft-test -o %t %s | FileCheck %s
3 module mm
4 !dir$ some directive 1
5 type t
6 logical :: tag
7 contains
8 final :: fin
9 end type
10 !dir$ some directive 2
12 contains
13 !dir$ some directive 3
14 subroutine fin(x)
15 type(t), intent(inout) :: x
16 x%tag =.true.
17 !dir$ some directive 4
18 call s1
19 call s2
20 print*, 'fin', x
22 contains
23 !dir$ some directive 5
24 subroutine s1
25 print*, 's1'
26 !dir$ some directive 6
27 end subroutine s1
29 !dir$ some directive 7
30 subroutine s2
31 !dir$ some directive 8
32 if (.true.) then
33 !dir$ some directive 9
34 print*, 's2'
35 !dir$ some directive 10
36 endif
37 !dir$ some directive 11
38 end subroutine s2
39 !dir$ some directive 12
40 end subroutine fin
41 !dir$ some directive 13
42 end module mm
43 !dir$ some directive 14
45 end
47 ! CHECK: Module mm: module mm
48 ! CHECK: CompilerDirective: !some directive 1
49 ! CHECK: CompilerDirective: !some directive 2
51 ! CHECK: Contains
52 ! CHECK: CompilerDirective: !some directive 3
54 ! CHECK: Subroutine fin: subroutine fin(x)
55 ! CHECK: AssignmentStmt: x%tag =.true.
56 ! CHECK: CompilerDirective: !some directive 4
57 ! CHECK: CallStmt: call s1
58 ! CHECK: CallStmt: call s2
59 ! CHECK: PrintStmt: print*, 'fin', x
60 ! CHECK: EndSubroutineStmt: end subroutine fin
62 ! CHECK: Contains
63 ! CHECK: CompilerDirective: !some directive 5
65 ! CHECK: Subroutine s1: subroutine s1
66 ! CHECK: PrintStmt: print*, 's1'
67 ! CHECK: CompilerDirective: !some directive 6
68 ! CHECK: EndSubroutineStmt: end subroutine s1
69 ! CHECK: End Subroutine s1
71 ! CHECK: CompilerDirective: !some directive 7
73 ! CHECK: Subroutine s2: subroutine s2
74 ! CHECK: CompilerDirective: !some directive 8
75 ! CHECK: <<IfConstruct>> -> 7
76 ! CHECK: IfThenStmt -> 7: if(.true.) then
77 ! CHECK: ^CompilerDirective: !some directive 9
78 ! CHECK: PrintStmt: print*, 's2'
79 ! CHECK: CompilerDirective: !some directive 10
80 ! CHECK: EndIfStmt: endif
81 ! CHECK: <<End IfConstruct>>
82 ! CHECK: CompilerDirective: !some directive 11
83 ! CHECK: EndSubroutineStmt: end subroutine s2
84 ! CHECK: End Subroutine s2
86 ! CHECK: CompilerDirective: !some directive 12
88 ! CHECK: End Contains
89 ! CHECK: End Subroutine fin
91 ! CHECK: CompilerDirective: !some directive 13
93 ! CHECK: End Contains
94 ! CHECK: End Module mm
96 ! CHECK: CompilerDirective: !some directive 14
98 ! CHECK: Program <anonymous>
99 ! CHECK: EndProgramStmt: end
100 ! CHECK: End Program <anonymous>