diff --git a/flang/lib/Lower/OpenMP.cpp b/flang/lib/Lower/OpenMP.cpp --- a/flang/lib/Lower/OpenMP.cpp +++ b/flang/lib/Lower/OpenMP.cpp @@ -1965,14 +1965,18 @@ dependOperands.push_back(((variable))); } } else { - TODO(converter.getCurrentLocation(), "OpenMP Block construct clause"); + TODO(clauseLocation, "OpenMP Block construct clause"); } } for (const auto &clause : std::get(endBlockDirective.t).v) { - if (std::get_if(&clause.u)) + mlir::Location clauseLocation = converter.genLocation(clause.source); + if (std::get_if(&clause.u)) { nowaitAttr = firOpBuilder.getUnitAttr(); + } else { + TODO(clauseLocation, "OpenMP Block construct clause"); + } } if (blockDirective.v == llvm::omp::OMPD_parallel) { diff --git a/flang/test/Lower/OpenMP/Todo/copyprivate.f90 b/flang/test/Lower/OpenMP/Todo/copyprivate.f90 new file mode 100644 --- /dev/null +++ b/flang/test/Lower/OpenMP/Todo/copyprivate.f90 @@ -0,0 +1,13 @@ +! RUN: %not_todo_cmd bbc -emit-fir -fopenmp -o - %s 2>&1 | FileCheck %s +! RUN: %not_todo_cmd %flang_fc1 -emit-fir -fopenmp -o - %s 2>&1 | FileCheck %s + +! CHECK: not yet implemented: OpenMP Block construct clause +subroutine sb + integer, save :: a + !$omp threadprivate(a) + !$omp parallel + !$omp single + a = 3 + !$omp end single copyprivate(a) + !$omp end parallel +end subroutine