1 !RUN: %flang_fc1 -fdebug-unparse -fopenmp -fopenmp-version=52 %s | FileCheck --ignore-case --check-prefix="UNPARSE" %s
2 !RUN: %flang_fc1 -fdebug-dump-parse-tree -fopenmp -fopenmp-version=52 %s | FileCheck --check-prefix="PARSE-TREE" %s
12 !UNPARSE: SUBROUTINE f00 (x)
14 !UNPARSE: !$OMP DO LINEAR(x)
15 !UNPARSE: DO x=1_4,10_4
17 !UNPARSE: !$OMP END DO
18 !UNPARSE: END SUBROUTINE
20 !PARSE-TREE: OmpBeginLoopDirective
21 !PARSE-TREE: | OmpLoopDirective -> llvm::omp::Directive = do
22 !PARSE-TREE: | OmpClauseList -> OmpClause -> Linear -> OmpLinearClause
23 !PARSE-TREE: | | OmpObjectList -> OmpObject -> Designator -> DataRef -> Name = 'x'
24 !PARSE-TREE: | | bool = 'true'
25 !PARSE-TREE: DoConstruct
29 !$omp do linear(x : 2)
35 !UNPARSE: SUBROUTINE f01 (x)
37 !UNPARSE: !$OMP DO LINEAR(x: 2_4)
38 !UNPARSE: DO x=1_4,10_4
40 !UNPARSE: !$OMP END DO
41 !UNPARSE: END SUBROUTINE
43 !PARSE-TREE: OmpBeginLoopDirective
44 !PARSE-TREE: | OmpLoopDirective -> llvm::omp::Directive = do
45 !PARSE-TREE: | OmpClauseList -> OmpClause -> Linear -> OmpLinearClause
46 !PARSE-TREE: | | OmpObjectList -> OmpObject -> Designator -> DataRef -> Name = 'x'
47 !PARSE-TREE: | | Modifier -> OmpStepSimpleModifier -> Scalar -> Integer -> Expr = '2_4'
48 !PARSE-TREE: | | | LiteralConstant -> IntLiteralConstant = '2'
49 !PARSE-TREE: | | bool = 'true'
50 !PARSE-TREE: DoConstruct
54 !$omp do linear(x : step(3))
60 !UNPARSE: SUBROUTINE f02 (x)
62 !UNPARSE: !$OMP DO LINEAR(x: STEP(3_4))
63 !UNPARSE: DO x=1_4,10_4
65 !UNPARSE: !$OMP END DO
66 !UNPARSE: END SUBROUTINE
68 !PARSE-TREE: OmpBeginLoopDirective
69 !PARSE-TREE: | OmpLoopDirective -> llvm::omp::Directive = do
70 !PARSE-TREE: | OmpClauseList -> OmpClause -> Linear -> OmpLinearClause
71 !PARSE-TREE: | | OmpObjectList -> OmpObject -> Designator -> DataRef -> Name = 'x'
72 !PARSE-TREE: | | Modifier -> OmpStepComplexModifier -> Scalar -> Integer -> Expr = '3_4'
73 !PARSE-TREE: | | | LiteralConstant -> IntLiteralConstant = '3'
74 !PARSE-TREE: | | bool = 'true'
75 !PARSE-TREE: DoConstruct
79 !$omp declare simd linear(x : uval)
82 !UNPARSE: SUBROUTINE f03 (x)
84 !UNPARSE: !$OMP DECLARE SIMD LINEAR(x: UVAL)
85 !UNPARSE: END SUBROUTINE
87 !PARSE-TREE: SpecificationPart
89 !PARSE-TREE: | DeclarationConstruct -> SpecificationConstruct -> OpenMPDeclarativeConstruct -> OpenMPDeclareSimdConstruct
90 !PARSE-TREE: | | Verbatim
91 !PARSE-TREE: | | OmpClauseList -> OmpClause -> Linear -> OmpLinearClause
92 !PARSE-TREE: | | | OmpObjectList -> OmpObject -> Designator -> DataRef -> Name = 'x'
93 !PARSE-TREE: | | | Modifier -> OmpLinearModifier -> Value = Uval
94 !PARSE-TREE: | | | bool = 'true'
95 !PARSE-TREE: ExecutionPart -> Block
99 !$omp declare simd linear(x : uval, step(3))
102 !UNPARSE: SUBROUTINE f04 (x)
104 !UNPARSE: !$OMP DECLARE SIMD LINEAR(x: UVAL, STEP(3_4))
105 !UNPARSE: END SUBROUTINE
107 !PARSE-TREE: SpecificationPart
109 !PARSE-TREE: | DeclarationConstruct -> SpecificationConstruct -> OpenMPDeclarativeConstruct -> OpenMPDeclareSimdConstruct
110 !PARSE-TREE: | | Verbatim
111 !PARSE-TREE: | | OmpClauseList -> OmpClause -> Linear -> OmpLinearClause
112 !PARSE-TREE: | | | OmpObjectList -> OmpObject -> Designator -> DataRef -> Name = 'x'
113 !PARSE-TREE: | | | Modifier -> OmpLinearModifier -> Value = Uval
114 !PARSE-TREE: | | | Modifier -> OmpStepComplexModifier -> Scalar -> Integer -> Expr = '3_4'
115 !PARSE-TREE: | | | | LiteralConstant -> IntLiteralConstant = '3'
116 !PARSE-TREE: | | | bool = 'true'
117 !PARSE-TREE: ExecutionPart -> Block