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
9 !$omp ordered depend(source)
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
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'
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
43 !$omp ordered depend(sink: i+1, j-2), depend(sink: i, j+3)
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
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'
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'