92 lines · plain
1!RUN: %flang_fc1 -fdebug-unparse -fopenmp -fopenmp-version=52 %s | FileCheck --ignore-case --check-prefix="UNPARSE" %s2!RUN: %flang_fc1 -fdebug-dump-parse-tree -fopenmp -fopenmp-version=52 %s | FileCheck --check-prefix="PARSE-TREE" %s3 4subroutine f00(x)5 integer :: x6 !$omp target update from(x)7end8 9!UNPARSE: SUBROUTINE f00 (x)10!UNPARSE: INTEGER x11!UNPARSE: !$OMP TARGET UPDATE FROM(x)12!UNPARSE: END SUBROUTINE13 14!PARSE-TREE: OmpDirectiveName -> llvm::omp::Directive = target update15!PARSE-TREE: OmpClauseList -> OmpClause -> From -> OmpFromClause16!PARSE-TREE: | OmpObjectList -> OmpObject -> Designator -> DataRef -> Name = 'x'17!PARSE-TREE: | bool = 'true'18 19subroutine f01(x)20 integer :: x21 !$omp target update from(present: x)22end23 24!UNPARSE: SUBROUTINE f01 (x)25!UNPARSE: INTEGER x26!UNPARSE: !$OMP TARGET UPDATE FROM(PRESENT: x)27!UNPARSE: END SUBROUTINE28 29!PARSE-TREE: OmpDirectiveName -> llvm::omp::Directive = target update30!PARSE-TREE: OmpClauseList -> OmpClause -> From -> OmpFromClause31!PARSE-TREE: | Modifier -> OmpExpectation -> Value = Present32!PARSE-TREE: | OmpObjectList -> OmpObject -> Designator -> DataRef -> Name = 'x'33!PARSE-TREE: | bool = 'true'34 35subroutine f02(x)36 integer :: x(10)37 !$omp target update from(present iterator(i = 1:10): x(i))38end39 40!UNPARSE: SUBROUTINE f02 (x)41!UNPARSE: INTEGER x(10_4)42!UNPARSE: !$OMP TARGET UPDATE FROM(PRESENT, ITERATOR(INTEGER i = 1_4:10_4): x(i))43!UNPARSE: END SUBROUTINE44 45!PARSE-TREE: OmpDirectiveName -> llvm::omp::Directive = target update46!PARSE-TREE: OmpClauseList -> OmpClause -> From -> OmpFromClause47!PARSE-TREE: | Modifier -> OmpExpectation -> Value = Present48!PARSE-TREE: | Modifier -> OmpIterator -> OmpIteratorSpecifier49!PARSE-TREE: | | TypeDeclarationStmt50!PARSE-TREE: | | | DeclarationTypeSpec -> IntrinsicTypeSpec -> IntegerTypeSpec ->51!PARSE-TREE: | | | EntityDecl52!PARSE-TREE: | | | | Name = 'i'53!PARSE-TREE: | | SubscriptTriplet54!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 -> ArrayElement59!PARSE-TREE: | | DataRef -> Name = 'x'60!PARSE-TREE: | | SectionSubscript -> Integer -> Expr = 'i'61!PARSE-TREE: | | | Designator -> DataRef -> Name = 'i'62!PARSE-TREE: | bool = 'false'63 64subroutine f03(x)65 integer :: x(10)66 !$omp target update from(present, iterator(i = 1:10): x(i))67end68 69!UNPARSE: SUBROUTINE f03 (x)70!UNPARSE: INTEGER x(10_4)71!UNPARSE: !$OMP TARGET UPDATE FROM(PRESENT, ITERATOR(INTEGER i = 1_4:10_4): x(i))72!UNPARSE: END SUBROUTINE73 74!PARSE-TREE: OmpDirectiveName -> llvm::omp::Directive = target update75!PARSE-TREE: OmpClauseList -> OmpClause -> From -> OmpFromClause76!PARSE-TREE: | Modifier -> OmpExpectation -> Value = Present77!PARSE-TREE: | Modifier -> OmpIterator -> OmpIteratorSpecifier78!PARSE-TREE: | | TypeDeclarationStmt79!PARSE-TREE: | | | DeclarationTypeSpec -> IntrinsicTypeSpec -> IntegerTypeSpec ->80!PARSE-TREE: | | | EntityDecl81!PARSE-TREE: | | | | Name = 'i'82!PARSE-TREE: | | SubscriptTriplet83!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 -> ArrayElement88!PARSE-TREE: | | DataRef -> Name = 'x'89!PARSE-TREE: | | SectionSubscript -> Integer -> Expr = 'i'90!PARSE-TREE: | | | Designator -> DataRef -> Name = 'i'91!PARSE-TREE: | bool = 'true'92