[Clang] Fix buildbot failure introduced by #121788
[llvm-project.git] / flang / test / Parser / OpenMP / target-update-to-clause.f90
blob03006ba37334f471bc91930a20f79ffad58d731a
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
4 subroutine f00(x)
5 integer :: x
6 !$omp target update to(x)
7 end
9 !UNPARSE: SUBROUTINE f00 (x)
10 !UNPARSE: INTEGER x
11 !UNPARSE: !$OMP TARGET UPDATE TO(x)
12 !UNPARSE: END SUBROUTINE
14 !PARSE-TREE: OmpSimpleStandaloneDirective -> llvm::omp::Directive = target update
15 !PARSE-TREE: OmpClauseList -> OmpClause -> To -> OmpToClause
16 !PARSE-TREE: | OmpObjectList -> OmpObject -> Designator -> DataRef -> Name = 'x'
17 !PARSE-TREE: | bool = 'true'
19 subroutine f01(x)
20 integer :: x
21 !$omp target update to(present: x)
22 end
24 !UNPARSE: SUBROUTINE f01 (x)
25 !UNPARSE: INTEGER x
26 !UNPARSE: !$OMP TARGET UPDATE TO(PRESENT: x)
27 !UNPARSE: END SUBROUTINE
29 !PARSE-TREE: OmpSimpleStandaloneDirective -> llvm::omp::Directive = target update
30 !PARSE-TREE: OmpClauseList -> OmpClause -> To -> OmpToClause
31 !PARSE-TREE: | Modifier -> OmpExpectation -> Value = Present
32 !PARSE-TREE: | OmpObjectList -> OmpObject -> Designator -> DataRef -> Name = 'x'
33 !PARSE-TREE: | bool = 'true'
35 subroutine f02(x)
36 integer :: x(10)
37 !$omp target update to(present iterator(i = 1:10): x(i))
38 end
40 !UNPARSE: SUBROUTINE f02 (x)
41 !UNPARSE: INTEGER x(10_4)
42 !UNPARSE: !$OMP TARGET UPDATE TO(PRESENT, ITERATOR(INTEGER i = 1_4:10_4): x(i))
43 !UNPARSE: END SUBROUTINE
45 !PARSE-TREE: OmpSimpleStandaloneDirective -> llvm::omp::Directive = target update
46 !PARSE-TREE: OmpClauseList -> OmpClause -> To -> OmpToClause
47 !PARSE-TREE: | Modifier -> OmpExpectation -> Value = Present
48 !PARSE-TREE: | Modifier -> OmpIterator -> OmpIteratorSpecifier
49 !PARSE-TREE: | | TypeDeclarationStmt
50 !PARSE-TREE: | | | DeclarationTypeSpec -> IntrinsicTypeSpec -> IntegerTypeSpec ->
51 !PARSE-TREE: | | | EntityDecl
52 !PARSE-TREE: | | | | Name = 'i'
53 !PARSE-TREE: | | SubscriptTriplet
54 !PARSE-TREE: | | | Scalar -> Integer -> Expr = '1_4'
55 !PARSE-TREE: | | | | LiteralConstant -> IntLiteralConstant = '1'
56 !PARSE-TREE: | | | Scalar -> Integer -> Expr = '10_4'
57 !PARSE-TREE: | | | | LiteralConstant -> IntLiteralConstant = '10'
58 !PARSE-TREE: | OmpObjectList -> OmpObject -> Designator -> DataRef -> ArrayElement
59 !PARSE-TREE: | | DataRef -> Name = 'x'
60 !PARSE-TREE: | | SectionSubscript -> Integer -> Expr = 'i'
61 !PARSE-TREE: | | | Designator -> DataRef -> Name = 'i'
62 !PARSE-TREE: | bool = 'false'
64 subroutine f03(x)
65 integer :: x(10)
66 !$omp target update to(present, iterator(i = 1:10): x(i))
67 end
69 !UNPARSE: SUBROUTINE f03 (x)
70 !UNPARSE: INTEGER x(10_4)
71 !UNPARSE: !$OMP TARGET UPDATE TO(PRESENT, ITERATOR(INTEGER i = 1_4:10_4): x(i))
72 !UNPARSE: END SUBROUTINE
74 !PARSE-TREE: OmpSimpleStandaloneDirective -> llvm::omp::Directive = target update
75 !PARSE-TREE: OmpClauseList -> OmpClause -> To -> OmpToClause
76 !PARSE-TREE: | Modifier -> OmpExpectation -> Value = Present
77 !PARSE-TREE: | Modifier -> OmpIterator -> OmpIteratorSpecifier
78 !PARSE-TREE: | | TypeDeclarationStmt
79 !PARSE-TREE: | | | DeclarationTypeSpec -> IntrinsicTypeSpec -> IntegerTypeSpec ->
80 !PARSE-TREE: | | | EntityDecl
81 !PARSE-TREE: | | | | Name = 'i'
82 !PARSE-TREE: | | SubscriptTriplet
83 !PARSE-TREE: | | | Scalar -> Integer -> Expr = '1_4'
84 !PARSE-TREE: | | | | LiteralConstant -> IntLiteralConstant = '1'
85 !PARSE-TREE: | | | Scalar -> Integer -> Expr = '10_4'
86 !PARSE-TREE: | | | | LiteralConstant -> IntLiteralConstant = '10'
87 !PARSE-TREE: | OmpObjectList -> OmpObject -> Designator -> DataRef -> ArrayElement
88 !PARSE-TREE: | | DataRef -> Name = 'x'
89 !PARSE-TREE: | | SectionSubscript -> Integer -> Expr = 'i'
90 !PARSE-TREE: | | | Designator -> DataRef -> Name = 'i'
91 !PARSE-TREE: | bool = 'true'