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 @@ -2432,6 +2432,7 @@ cp.processDepend(dependTypeOperands, dependOperands); for (const Fortran::parser::OmpClause &clause : opClauseList.v) { + mlir::Location clauseLocation = converter.genLocation(clause.source); if (!std::get_if(&clause.u) && !std::get_if(&clause.u) && !std::get_if(&clause.u) && @@ -2458,13 +2459,19 @@ !std::get_if(&clause.u) && !std::get_if(&clause.u) && !std::get_if(&clause.u)) { - TODO(converter.getCurrentLocation(), "OpenMP Block construct clause"); + TODO(clauseLocation, "OpenMP Block construct clause"); } } ClauseProcessor(converter, std::get(endBlockDirective.t)) .processNowait(nowaitAttr); + for (const auto &clause : + std::get(endBlockDirective.t).v) { + mlir::Location clauseLocation = converter.genLocation(clause.source); + if (!std::get_if(&clause.u)) + TODO(clauseLocation, "OpenMP Block construct clause"); + } if (blockDirective.v == llvm::omp::OMPD_parallel) { // Create and insert the operation. 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