91 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 :: x(10, 10)6 !$omp do ordered(2)7 do i = 1, 108 do j = 1, 109 !$omp ordered doacross(source)10 x(i, j) = i + j11 enddo12 enddo13 !$omp end do14end15 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_420!UNPARSE: DO j=1_4,10_421!UNPARSE: !$OMP ORDERED DOACROSS(SOURCE)22!UNPARSE: x(int(i,kind=8),int(j,kind=8))=i+j23!UNPARSE: END DO24!UNPARSE: END DO25!UNPARSE: !$OMP END DO26!UNPARSE: END SUBROUTINE27 28!PARSE-TREE-LABEL: ProgramUnit -> SubroutineSubprogram29!PARSE-TREE: OmpBeginLoopDirective30!PARSE-TREE: | OmpDirectiveName -> llvm::omp::Directive = do31!PARSE-TREE: | OmpClauseList -> OmpClause -> Ordered -> Scalar -> Integer -> Constant -> Expr = '2_4'32!PARSE-TREE: | | LiteralConstant -> IntLiteralConstant = '2'33![...]34!PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OpenMPStandaloneConstruct -> OpenMPSimpleStandaloneConstruct -> OmpDirectiveSpecification35!PARSE-TREE: | OmpDirectiveName -> llvm::omp::Directive = ordered36!PARSE-TREE: | OmpClauseList -> OmpClause -> Doacross -> OmpDoacrossClause -> OmpDoacross -> Source37 38subroutine f01(x)39 integer :: x(10, 10)40 !$omp do ordered(2)41 do i = 1, 1042 do j = 1, 1043 !$omp ordered doacross(sink: i+1, j-2), doacross(sink: i, j+3)44 x(i, j) = i + j45 enddo46 enddo47 !$omp end do48end49 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_454!UNPARSE: DO j=1_4,10_455!UNPARSE: !$OMP ORDERED DOACROSS(SINK: i+1_4, j-2_4) DOACROSS(SINK: i, j+3_4)56!UNPARSE: x(int(i,kind=8),int(j,kind=8))=i+j57!UNPARSE: END DO58!UNPARSE: END DO59!UNPARSE: !$OMP END DO60!UNPARSE: END SUBROUTINE61 62!PARSE-TREE-LABEL: ProgramUnit -> SubroutineSubprogram63!PARSE-TREE: OmpBeginLoopDirective64!PARSE-TREE: | OmpDirectiveName -> llvm::omp::Directive = do65!PARSE-TREE: | OmpClauseList -> OmpClause -> Ordered -> Scalar -> Integer -> Constant -> Expr = '2_4'66!PARSE-TREE: | | LiteralConstant -> IntLiteralConstant = '2'67![...]68!PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OpenMPStandaloneConstruct -> OpenMPSimpleStandaloneConstruct -> OmpDirectiveSpecification69!PARSE-TREE: | OmpDirectiveName -> llvm::omp::Directive = ordered70!PARSE-TREE: | OmpClauseList -> OmpClause -> Doacross -> OmpDoacrossClause -> OmpDoacross -> Sink -> OmpIterationVector -> OmpIteration71!PARSE-TREE: | | Name = 'i'72!PARSE-TREE: | | OmpIterationOffset73!PARSE-TREE: | | | DefinedOperator -> IntrinsicOperator = Add74!PARSE-TREE: | | | Scalar -> Integer -> Constant -> Expr = '1_4'75!PARSE-TREE: | | | | LiteralConstant -> IntLiteralConstant = '1'76!PARSE-TREE: | OmpIteration77!PARSE-TREE: | | Name = 'j'78!PARSE-TREE: | | OmpIterationOffset79!PARSE-TREE: | | | DefinedOperator -> IntrinsicOperator = Subtract80!PARSE-TREE: | | | Scalar -> Integer -> Constant -> Expr = '2_4'81!PARSE-TREE: | | | | LiteralConstant -> IntLiteralConstant = '2'82!PARSE-TREE: | OmpClause -> Doacross -> OmpDoacrossClause -> OmpDoacross -> Sink -> OmpIterationVector -> OmpIteration83!PARSE-TREE: | | Name = 'i'84!PARSE-TREE: | OmpIteration85!PARSE-TREE: | | Name = 'j'86!PARSE-TREE: | | OmpIterationOffset87!PARSE-TREE: | | | DefinedOperator -> IntrinsicOperator = Add88!PARSE-TREE: | | | Scalar -> Integer -> Constant -> Expr = '3_4'89!PARSE-TREE: | | | | LiteralConstant -> IntLiteralConstant = '3'90 91