Skip to content

Commit 6cbaf66

Browse files
Remove duplicate checks
1 parent 656864e commit 6cbaf66

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

flang/lib/Semantics/check-omp-structure.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2885,12 +2885,6 @@ void OmpStructureChecker::Leave(const parser::OmpClauseList &) {
28852885
// clause
28862886
CheckMultListItems();
28872887

2888-
// 2.7.3 Single Construct Restriction
2889-
if (GetContext().directive == llvm::omp::Directive::OMPD_end_single) {
2890-
CheckNotAllowedIfClause(
2891-
llvm::omp::Clause::OMPC_copyprivate, {llvm::omp::Clause::OMPC_nowait});
2892-
}
2893-
28942888
auto testThreadprivateVarErr = [&](Symbol sym, parser::Name name,
28952889
llvmOmpClause clauseTy) {
28962890
if (sym.test(Symbol::Flag::OmpThreadprivate))

flang/test/Semantics/OpenMP/clause-validity01.f90

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,6 @@
333333
!ERROR: NOWAIT clause must not be used with COPYPRIVATE clause on the SINGLE directive
334334
!$omp single private(a) lastprivate(c) nowait
335335
a = 3.14
336-
!ERROR: Clause NOWAIT is not allowed if clause COPYPRIVATE appears on the END SINGLE directive
337336
!ERROR: COPYPRIVATE variable 'a' may not appear on a PRIVATE or FIRSTPRIVATE clause on a SINGLE construct
338337
!ERROR: At most one NOWAIT clause can appear on the SINGLE directive
339338
!ERROR: At most one NOWAIT clause can appear on the SINGLE directive
@@ -428,7 +427,7 @@
428427
enddo
429428
enddo
430429
!omp end do nowait
431-
!$omp end parallel
430+
!$omp end parallel
432431

433432
! 2.11.4 parallel-do-simd-clause -> parallel-clause |
434433
! do-simd-clause
@@ -586,7 +585,7 @@
586585
allc = 3.14
587586
enddo
588587

589-
!$omp target enter data map(alloc:A) device(0)
590-
!$omp target exit data map(delete:A) device(0)
588+
!$omp target enter data map(alloc:A) device(0)
589+
!$omp target exit data map(delete:A) device(0)
591590

592591
end program

0 commit comments

Comments
 (0)