diff options
Diffstat (limited to 'flang/test/Parser/OpenMP/cross-label-do.f90')
| -rw-r--r-- | flang/test/Parser/OpenMP/cross-label-do.f90 | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/flang/test/Parser/OpenMP/cross-label-do.f90 b/flang/test/Parser/OpenMP/cross-label-do.f90 new file mode 100644 index 000000000000..52ac264756df --- /dev/null +++ b/flang/test/Parser/OpenMP/cross-label-do.f90 @@ -0,0 +1,48 @@ +!RUN: %flang_fc1 -fdebug-unparse -fopenmp %s | FileCheck --ignore-case --check-prefix="UNPARSE" %s +!RUN: %flang_fc1 -fdebug-dump-parse-tree -fopenmp %s | FileCheck --check-prefix="PARSE-TREE" %s + +subroutine f00 + integer :: i, j + do 100 i = 1,10 +!$omp do + do 100 j = 1,10 + 100 continue +end + +!UNPARSE: SUBROUTINE f00 +!UNPARSE: INTEGER i, j +!UNPARSE: DO i=1_4,10_4 +!UNPARSE: !$OMP DO +!UNPARSE: DO j=1_4,10_4 +!UNPARSE: 100 CONTINUE +!UNPARSE: END DO +!UNPARSE: END DO +!UNPARSE: END SUBROUTINE + +!PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> DoConstruct +!PARSE-TREE: | NonLabelDoStmt +!PARSE-TREE: | | LoopControl -> LoopBounds +!PARSE-TREE: | | | Scalar -> Name = 'i' +!PARSE-TREE: | | | Scalar -> Expr = '1_4' +!PARSE-TREE: | | | | LiteralConstant -> IntLiteralConstant = '1' +!PARSE-TREE: | | | Scalar -> Expr = '10_4' +!PARSE-TREE: | | | | LiteralConstant -> IntLiteralConstant = '10' +!PARSE-TREE: | Block +!PARSE-TREE: | | ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OpenMPLoopConstruct +!PARSE-TREE: | | | OmpBeginLoopDirective +!PARSE-TREE: | | | | OmpDirectiveName -> llvm::omp::Directive = do +!PARSE-TREE: | | | | OmpClauseList -> +!PARSE-TREE: | | | | Flags = None +!PARSE-TREE: | | | Block +!PARSE-TREE: | | | | ExecutionPartConstruct -> ExecutableConstruct -> DoConstruct +!PARSE-TREE: | | | | | NonLabelDoStmt +!PARSE-TREE: | | | | | | LoopControl -> LoopBounds +!PARSE-TREE: | | | | | | | Scalar -> Name = 'j' +!PARSE-TREE: | | | | | | | Scalar -> Expr = '1_4' +!PARSE-TREE: | | | | | | | | LiteralConstant -> IntLiteralConstant = '1' +!PARSE-TREE: | | | | | | | Scalar -> Expr = '10_4' +!PARSE-TREE: | | | | | | | | LiteralConstant -> IntLiteralConstant = '10' +!PARSE-TREE: | | | | | Block +!PARSE-TREE: | | | | | | ExecutionPartConstruct -> ExecutableConstruct -> ActionStmt -> ContinueStmt +!PARSE-TREE: | | | | | EndDoStmt -> +!PARSE-TREE: | EndDoStmt -> |
