forked from OSchip/llvm-project
[flang][OpenMP][OpenACC] Fix exit of a region
The stop statement is allowed in OpenMP/OpenACC block region. Reviewed By: kiranchandramohan, shraiysh Differential Revision: https://reviews.llvm.org/D126471
This commit is contained in:
parent
936e9bf4bd
commit
65af17c7a0
|
@ -58,7 +58,6 @@ public:
|
|||
CheckConstructNameBranching("EXIT");
|
||||
}
|
||||
}
|
||||
void Post(const parser::StopStmt &) { EmitBranchOutError("STOP"); }
|
||||
void Post(const parser::CycleStmt &cycleStmt) {
|
||||
if (const auto &cycleName{cycleStmt.v}) {
|
||||
CheckConstructNameBranching("CYCLE", cycleName.value());
|
||||
|
|
|
@ -93,8 +93,7 @@ program openacc_clause_validity
|
|||
do i = 1, N
|
||||
a(i) = 3.14
|
||||
if(i == N-1) THEN
|
||||
!ERROR: STOP statement is not allowed in a PARALLEL construct
|
||||
stop 999
|
||||
stop 999 ! no error
|
||||
end if
|
||||
end do
|
||||
!$acc end parallel
|
||||
|
@ -120,8 +119,7 @@ program openacc_clause_validity
|
|||
do i = 1, N
|
||||
a(i) = 3.14
|
||||
if(i == N-1) THEN
|
||||
!ERROR: STOP statement is not allowed in a KERNELS construct
|
||||
stop 999
|
||||
stop 999 ! no error
|
||||
end if
|
||||
end do
|
||||
!$acc end kernels
|
||||
|
@ -163,8 +161,7 @@ program openacc_clause_validity
|
|||
do i = 1, N
|
||||
a(i) = 3.14
|
||||
if(i == N-1) THEN
|
||||
!ERROR: STOP statement is not allowed in a SERIAL construct
|
||||
stop 999
|
||||
stop 999 ! no error
|
||||
end if
|
||||
end do
|
||||
!$acc end serial
|
||||
|
|
|
@ -15,7 +15,6 @@ program omp_parallel
|
|||
do j = 1, 10
|
||||
print *, "Hello"
|
||||
!CHECK: In the enclosing PARALLEL directive branched into
|
||||
!CHECK: STOP statement is not allowed in a PARALLEL construct
|
||||
10 stop
|
||||
end do
|
||||
end do
|
||||
|
|
|
@ -17,7 +17,6 @@ recursive subroutine traverse ( P )
|
|||
!$omp task
|
||||
call traverse(P%left)
|
||||
!CHECK: In the enclosing TASK directive branched into
|
||||
!CHECK: STOP statement is not allowed in a TASK construct
|
||||
10 stop
|
||||
!$omp end task
|
||||
endif
|
||||
|
|
Loading…
Reference in New Issue