Skip to content

Commit 008d63b

Browse files
committed
Add strictly structured blocks to testcase
1 parent b3f56be commit 008d63b

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

flang/test/Parser/OpenMP/assumption.f90

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ subroutine sub1
1313
!$omp end assume
1414

1515
!$omp assume absent(allocate), contains(workshare, task)
16-
!$omp end assume
16+
block ! strictly-structured-block
17+
end block
1718

1819
!$omp assume holds(1.eq.1)
19-
!$omp end assume
20+
block
21+
end block
2022
print *, r
2123
end subroutine sub1
2224

@@ -29,9 +31,11 @@ end subroutine sub1
2931
!UNPARSE: !$OMP ASSUME NO_OPENMP_ROUTINES
3032
!UNPARSE: !$OMP END ASSUME
3133
!UNPARSE: !$OMP ASSUME ABSENT(ALLOCATE) CONTAINS(WORKSHARE,TASK)
32-
!UNPARSE: !$OMP END ASSUME
34+
!UNPARSE: BLOCK
35+
!UNPARSE: END BLOCK
3336
!UNPARSE: !$OMP ASSUME HOLDS(1==1)
34-
!UNPARSE: !$OMP END ASSUME
37+
!UNPARSE: BLOCK
38+
!UNPARSE: END BLOCK
3539
!UNPARSE: PRINT *, r
3640
!UNPARSE: END SUBROUTINE sub1
3741

@@ -73,10 +77,12 @@ end subroutine sub1
7377
!PARSE-TREE: | | llvm::omp::Directive = task
7478
!PARSE-TREE: | | Flags = None
7579
!PARSE-TREE: | Block
76-
!PARSE-TREE: | OmpEndDirective
77-
!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = assume
78-
!PARSE-TREE: | | OmpClauseList ->
79-
!PARSE-TREE: | | Flags = None
80+
!PARSE-TREE: | | ExecutionPartConstruct -> ExecutableConstruct -> BlockConstruct
81+
!PARSE-TREE: | | | BlockStmt ->
82+
!PARSE-TREE: | | | BlockSpecificationPart -> SpecificationPart
83+
!PARSE-TREE: | | | | ImplicitPart ->
84+
!PARSE-TREE: | | | Block
85+
!PARSE-TREE: | | | EndBlockStmt ->
8086
!PARSE-TREE: ExecutionPartConstruct -> ExecutableConstruct -> OpenMPConstruct -> OpenMPAssumeConstruct
8187
!PARSE-TREE: | OmpBeginDirective
8288
!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = assume
@@ -85,10 +91,12 @@ end subroutine sub1
8591
!PARSE-TREE: | | | Expr -> LiteralConstant -> IntLiteralConstant = '1'
8692
!PARSE-TREE: | | Flags = None
8793
!PARSE-TREE: | Block
88-
!PARSE-TREE: | OmpEndDirective
89-
!PARSE-TREE: | | OmpDirectiveName -> llvm::omp::Directive = assume
90-
!PARSE-TREE: | | OmpClauseList ->
91-
!PARSE-TREE: | | Flags = None
94+
!PARSE-TREE: | | ExecutionPartConstruct -> ExecutableConstruct -> BlockConstruct
95+
!PARSE-TREE: | | | BlockStmt ->
96+
!PARSE-TREE: | | | BlockSpecificationPart -> SpecificationPart
97+
!PARSE-TREE: | | | | ImplicitPart ->
98+
!PARSE-TREE: | | | Block
99+
!PARSE-TREE: | | | EndBlockStmt ->
92100

93101

94102
subroutine sub2

0 commit comments

Comments
 (0)