Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Lower / pre-fir-tree05.f90
blobaeca3ab79ac9fdd66edd484c7c127391b08b87a2
1 ! RUN: %flang_fc1 -fdebug-pre-fir-tree -fopenacc %s | FileCheck %s
3 ! Test structure of the Pre-FIR tree with OpenACC construct
5 ! CHECK: Subroutine foo
6 subroutine foo()
7 ! CHECK-NEXT: <<OpenACCConstruct>>
8 ! CHECK-NEXT: <<OpenACCConstruct>>
9 !$acc parallel
10 !$acc loop
11 ! CHECK-NEXT: <<DoConstruct>>
12 ! CHECK-NEXT: NonLabelDoStmt
13 do i=1,5
14 ! CHECK-NEXT: PrintStmt
15 print *, "hey"
16 ! CHECK-NEXT: <<DoConstruct>>
17 ! CHECK-NEXT: NonLabelDoStmt
18 do j=1,5
19 ! CHECK-NEXT: PrintStmt
20 print *, "hello", i, j
21 ! CHECK-NEXT: EndDoStmt
22 ! CHECK-NEXT: <<End DoConstruct>>
23 end do
24 ! CHECK-NEXT: EndDoStmt
25 ! CHECK-NEXT: <<End DoConstruct>>
26 end do
27 ! CHECK-NEXT: ContinueStmt
28 !$acc end parallel
29 ! CHECK-NEXT: <<End OpenACCConstruct>>
30 ! CHECK-NEXT: <<End OpenACCConstruct>>
31 ! CHECK-NEXT: EndSubroutineStmt
32 end subroutine
33 ! CHECK-NEXT: End Subroutine foo
35 ! CHECK: Subroutine foo2
36 subroutine foo2()
37 ! CHECK-NEXT: <<OpenACCConstruct>>
38 !$acc parallel loop
39 ! CHECK-NEXT: <<DoConstruct>>
40 ! CHECK-NEXT: NonLabelDoStmt
41 do i=1,5
42 ! CHECK-NEXT: EndDoStmt
43 ! CHECK-NEXT: <<End DoConstruct>>
44 end do
45 ! CHECK-NEXT: ContinueStmt
46 !$acc end parallel loop
47 ! CHECK-NEXT: <<End OpenACCConstruct>>
48 ! CHECK-NEXT: EndSubroutineStmt
49 end subroutine
50 ! CHECK-NEXT: End Subroutine foo2