Index: flang/lib/Semantics/check-directive-structure.h =================================================================== --- flang/lib/Semantics/check-directive-structure.h +++ flang/lib/Semantics/check-directive-structure.h @@ -58,7 +58,6 @@ 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()); Index: flang/test/Semantics/OpenACC/acc-branch.f90 =================================================================== --- flang/test/Semantics/OpenACC/acc-branch.f90 +++ flang/test/Semantics/OpenACC/acc-branch.f90 @@ -93,8 +93,7 @@ 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 @@ 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 @@ 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 Index: flang/test/Semantics/omp-parallel02.f90 =================================================================== --- flang/test/Semantics/omp-parallel02.f90 +++ flang/test/Semantics/omp-parallel02.f90 @@ -15,7 +15,6 @@ 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 Index: flang/test/Semantics/omp-task01.f90 =================================================================== --- flang/test/Semantics/omp-task01.f90 +++ flang/test/Semantics/omp-task01.f90 @@ -17,7 +17,6 @@ !$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