80 lines · plain
1!RUN: %flang_fc1 -fdebug-unparse -fopenmp -fopenmp-version=50 %s | FileCheck --ignore-case --check-prefix="UNPARSE" %s2!RUN: %flang_fc1 -fdebug-dump-parse-tree -fopenmp -fopenmp-version=50 %s | FileCheck --check-prefix="PARSE-TREE" %s3 4subroutine f00(x)5 integer :: x(10)6!$omp task affinity(x)7 x = x + 18!$omp end task9end10 11!UNPARSE: SUBROUTINE f00 (x)12!UNPARSE: INTEGER x(10_4)13!UNPARSE: !$OMP TASK AFFINITY(x)14!UNPARSE: x=x+1_415!UNPARSE: !$OMP END TASK16!UNPARSE: END SUBROUTINE17 18!PARSE-TREE: OmpBeginDirective19!PARSE-TREE: | OmpDirectiveName -> llvm::omp::Directive = task20!PARSE-TREE: | OmpClauseList -> OmpClause -> Affinity -> OmpAffinityClause21!PARSE-TREE: | | OmpObjectList -> OmpObject -> Designator -> DataRef -> Name = 'x'22 23subroutine f01(x)24 integer :: x(10)25!$omp task affinity(x(1), x(3))26 x = x + 127!$omp end task28end29 30!UNPARSE: SUBROUTINE f01 (x)31!UNPARSE: INTEGER x(10_4)32!UNPARSE: !$OMP TASK AFFINITY(x(1_4),x(3_4))33!UNPARSE: x=x+1_434!UNPARSE: !$OMP END TASK35!UNPARSE: END SUBROUTINE36 37!PARSE-TREE: OmpBeginDirective38!PARSE-TREE: | OmpDirectiveName -> llvm::omp::Directive = task39!PARSE-TREE: | OmpClauseList -> OmpClause -> Affinity -> OmpAffinityClause40!PARSE-TREE: | | OmpObjectList -> OmpObject -> Designator -> DataRef -> ArrayElement41!PARSE-TREE: | | | DataRef -> Name = 'x'42!PARSE-TREE: | | | SectionSubscript -> Integer -> Expr = '1_4'43!PARSE-TREE: | | | | LiteralConstant -> IntLiteralConstant = '1'44!PARSE-TREE: | | OmpObject -> Designator -> DataRef -> ArrayElement45!PARSE-TREE: | | | DataRef -> Name = 'x'46!PARSE-TREE: | | | SectionSubscript -> Integer -> Expr = '3_4'47!PARSE-TREE: | | | | LiteralConstant -> IntLiteralConstant = '3'48 49subroutine f02(x)50 integer :: x(10)51!$omp task affinity(iterator(i = 1:3): x(i))52 x = x + 153!$omp end task54end55 56!UNPARSE: SUBROUTINE f02 (x)57!UNPARSE: INTEGER x(10_4)58!UNPARSE: !$OMP TASK AFFINITY(ITERATOR(INTEGER i = 1_4:3_4): x(i))59!UNPARSE: x=x+1_460!UNPARSE: !$OMP END TASK61!UNPARSE: END SUBROUTINE62 63!PARSE-TREE: OmpBeginDirective64!PARSE-TREE: | OmpDirectiveName -> llvm::omp::Directive = task65!PARSE-TREE: | OmpClauseList -> OmpClause -> Affinity -> OmpAffinityClause66!PARSE-TREE: | | Modifier -> OmpIterator -> OmpIteratorSpecifier67!PARSE-TREE: | | | TypeDeclarationStmt68!PARSE-TREE: | | | | DeclarationTypeSpec -> IntrinsicTypeSpec -> IntegerTypeSpec ->69!PARSE-TREE: | | | | EntityDecl70!PARSE-TREE: | | | | | Name = 'i'71!PARSE-TREE: | | | SubscriptTriplet72!PARSE-TREE: | | | | Scalar -> Integer -> Expr = '1_4'73!PARSE-TREE: | | | | | LiteralConstant -> IntLiteralConstant = '1'74!PARSE-TREE: | | | | Scalar -> Integer -> Expr = '3_4'75!PARSE-TREE: | | | | | LiteralConstant -> IntLiteralConstant = '3'76!PARSE-TREE: | | OmpObjectList -> OmpObject -> Designator -> DataRef -> ArrayElement77!PARSE-TREE: | | | DataRef -> Name = 'x'78!PARSE-TREE: | | | SectionSubscript -> Integer -> Expr = 'i'79!PARSE-TREE: | | | | Designator -> DataRef -> Name = 'i'80