[Clang] Fix buildbot failure introduced by #121788
[llvm-project.git] / flang / test / Parser / OpenMP / target-loop-unparse.f90
blobee0013f61340305b29e87a1fdae365aa26e2c8e9
1 ! RUN: %flang_fc1 -fdebug-unparse -fopenmp -fopenmp-version=50 %s | \
2 ! RUN: FileCheck --ignore-case %s
4 ! RUN: %flang_fc1 -fdebug-dump-parse-tree -fopenmp -fopenmp-version=50 %s | \
5 ! RUN: FileCheck --check-prefix="PARSE-TREE" %s
7 ! Check for parsing of loop directive
9 subroutine test_loop
10 integer :: i, j = 1
11 !PARSE-TREE: OmpBeginLoopDirective
12 !PARSE-TREE-NEXT: OmpLoopDirective -> llvm::omp::Directive = loop
13 !CHECK: !$omp loop
14 !$omp loop
15 do i=1,10
16 j = j + 1
17 end do
18 !$omp end loop
20 !PARSE-TREE: OmpBeginLoopDirective
21 !PARSE-TREE-NEXT: OmpLoopDirective -> llvm::omp::Directive = loop
22 !PARSE-TREE-NEXT: OmpClauseList -> OmpClause -> Bind -> OmpBindClause -> Binding = Thread
23 !CHECK: !$omp loop
24 !$omp loop bind(thread)
25 do i=1,10
26 j = j + 1
27 end do
28 !$omp end loop
29 end subroutine
31 subroutine test_target_loop
32 integer :: i, j = 1
33 !PARSE-TREE: OmpBeginLoopDirective
34 !PARSE-TREE-NEXT: OmpLoopDirective -> llvm::omp::Directive = target loop
35 !CHECK: !$omp target loop
36 !$omp target loop
37 do i=1,10
38 j = j + 1
39 end do
40 !$omp end target loop
41 end subroutine
43 subroutine test_target_teams_loop
44 integer :: i, j = 1
45 !PARSE-TREE: OmpBeginLoopDirective
46 !PARSE-TREE-NEXT: OmpLoopDirective -> llvm::omp::Directive = target teams loop
47 !CHECK: !$omp target teams loop
48 !$omp target teams loop
49 do i=1,10
50 j = j + 1
51 end do
52 !$omp end target teams loop
53 end subroutine
55 subroutine test_target_parallel_loop
56 integer :: i, j = 1
57 !PARSE-TREE: OmpBeginLoopDirective
58 !PARSE-TREE-NEXT: OmpLoopDirective -> llvm::omp::Directive = target parallel loop
59 !CHECK: !$omp target parallel loop
60 !$omp target parallel loop
61 do i=1,10
62 j = j + 1
63 end do
64 !$omp end target parallel loop
65 end subroutine