[Clang] Fix buildbot failure introduced by #121788
[llvm-project.git] / flang / test / Parser / OpenMP / ordered-depend.f90
blob9e0946af0f09aea8010ab11d859dd31cd1655b73
1 !RUN: %flang_fc1 -fdebug-unparse -fopenmp -fopenmp-version=45 %s | FileCheck --ignore-case --check-prefix="UNPARSE" %s
2 !RUN: %flang_fc1 -fdebug-dump-parse-tree -fopenmp -fopenmp-version=45 %s | FileCheck --check-prefix="PARSE-TREE" %s
4 subroutine f00(x)
5 integer :: x(10, 10)
6 !$omp do ordered(2)
7 do i = 1, 10
8 do j = 1, 10
9 !$omp ordered depend(source)
10 x(i, j) = i + j
11 enddo
12 enddo
13 !$omp end do
14 end
16 !UNPARSE: SUBROUTINE f00 (x)
17 !UNPARSE: INTEGER x(10_4,10_4)
18 !UNPARSE: !$OMP DO ORDERED(2_4)
19 !UNPARSE: DO i=1_4,10_4
20 !UNPARSE: DO j=1_4,10_4
21 !UNPARSE: !$OMP ORDERED DEPEND(SOURCE)
22 !UNPARSE: x(int(i,kind=8),int(j,kind=8))=i+j
23 !UNPARSE: END DO
24 !UNPARSE: END DO
25 !UNPARSE: !$OMP END DO
26 !UNPARSE: END SUBROUTINE
28 !PARSE-TREE-LABEL: ProgramUnit -> SubroutineSubprogram
29 !PARSE-TREE: OmpBeginLoopDirective
30 !PARSE-TREE: | OmpLoopDirective -> llvm::omp::Directive = do
31 !PARSE-TREE: | OmpClauseList -> OmpClause -> Ordered -> Scalar -> Integer -> Constant -> Expr = '2_4'
32 !PARSE-TREE: | | LiteralConstant -> IntLiteralConstant = '2'
33 ![...]
34 !PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OpenMPStandaloneConstruct -> OpenMPSimpleStandaloneConstruct
35 !PARSE-TREE: | OmpSimpleStandaloneDirective -> llvm::omp::Directive = ordered
36 !PARSE-TREE: | OmpClauseList -> OmpClause -> Depend -> OmpDependClause -> OmpDoacross -> Source
38 subroutine f01(x)
39 integer :: x(10, 10)
40 !$omp do ordered(2)
41 do i = 1, 10
42 do j = 1, 10
43 !$omp ordered depend(sink: i+1, j-2), depend(sink: i, j+3)
44 x(i, j) = i + j
45 enddo
46 enddo
47 !$omp end do
48 end
50 !UNPARSE: SUBROUTINE f01 (x)
51 !UNPARSE: INTEGER x(10_4,10_4)
52 !UNPARSE: !$OMP DO ORDERED(2_4)
53 !UNPARSE: DO i=1_4,10_4
54 !UNPARSE: DO j=1_4,10_4
55 !UNPARSE: !$OMP ORDERED DEPEND(SINK: i+1_4, j-2_4) DEPEND(SINK: i, j+3_4)
56 !UNPARSE: x(int(i,kind=8),int(j,kind=8))=i+j
57 !UNPARSE: END DO
58 !UNPARSE: END DO
59 !UNPARSE: !$OMP END DO
60 !UNPARSE: END SUBROUTINE
62 !PARSE-TREE-LABEL: ProgramUnit -> SubroutineSubprogram
63 !PARSE-TREE: OmpBeginLoopDirective
64 !PARSE-TREE: | OmpLoopDirective -> llvm::omp::Directive = do
65 !PARSE-TREE: | OmpClauseList -> OmpClause -> Ordered -> Scalar -> Integer -> Constant -> Expr = '2_4'
66 !PARSE-TREE: | | LiteralConstant -> IntLiteralConstant = '2'
67 ![...]
68 !PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OpenMPStandaloneConstruct -> OpenMPSimpleStandaloneConstruct
69 !PARSE-TREE: | OmpSimpleStandaloneDirective -> llvm::omp::Directive = ordered
70 !PARSE-TREE: | OmpClauseList -> OmpClause -> Depend -> OmpDependClause -> OmpDoacross -> Sink -> OmpIterationVector -> OmpIteration
71 !PARSE-TREE: | | Name = 'i'
72 !PARSE-TREE: | | OmpIterationOffset
73 !PARSE-TREE: | | | DefinedOperator -> IntrinsicOperator = Add
74 !PARSE-TREE: | | | Scalar -> Integer -> Constant -> Expr = '1_4'
75 !PARSE-TREE: | | | | LiteralConstant -> IntLiteralConstant = '1'
76 !PARSE-TREE: | OmpIteration
77 !PARSE-TREE: | | Name = 'j'
78 !PARSE-TREE: | | OmpIterationOffset
79 !PARSE-TREE: | | | DefinedOperator -> IntrinsicOperator = Subtract
80 !PARSE-TREE: | | | Scalar -> Integer -> Constant -> Expr = '2_4'
81 !PARSE-TREE: | | | | LiteralConstant -> IntLiteralConstant = '2'
82 !PARSE-TREE: | OmpClause -> Depend -> OmpDependClause -> OmpDoacross -> Sink -> OmpIterationVector -> OmpIteration
83 !PARSE-TREE: | | Name = 'i'
84 !PARSE-TREE: | OmpIteration
85 !PARSE-TREE: | | Name = 'j'
86 !PARSE-TREE: | | OmpIterationOffset
87 !PARSE-TREE: | | | DefinedOperator -> IntrinsicOperator = Add
88 !PARSE-TREE: | | | Scalar -> Integer -> Constant -> Expr = '3_4'
89 !PARSE-TREE: | | | | LiteralConstant -> IntLiteralConstant = '3'