diff --git a/flang/lib/Lower/OpenMP.cpp b/flang/lib/Lower/OpenMP.cpp index da589626d8b4a..1084707fd23be 100644 --- a/flang/lib/Lower/OpenMP.cpp +++ b/flang/lib/Lower/OpenMP.cpp @@ -997,8 +997,13 @@ genOMP(Fortran::lower::AbstractConverter &converter, &clause.u)) { priorityClauseOperand = fir::getBase(converter.genExprValue( *Fortran::semantics::GetExpr(priorityClause->v), stmtCtx)); + } else if (std::get_if(&clause.u)) { + TODO(currentLocation, + "Reduction in OpenMP " + + llvm::omp::getOpenMPDirectiveName(blockDirective.v) + + " construct"); } else { - TODO(currentLocation, "OpenMP Block construct clauses"); + TODO(converter.getCurrentLocation(), "OpenMP Block construct clause"); } } diff --git a/flang/test/Lower/OpenMP/Todo/parallel-reduction.f90 b/flang/test/Lower/OpenMP/Todo/parallel-reduction.f90 index 54b58ada8ab09..df13f1faefe80 100644 --- a/flang/test/Lower/OpenMP/Todo/parallel-reduction.f90 +++ b/flang/test/Lower/OpenMP/Todo/parallel-reduction.f90 @@ -1,7 +1,7 @@ ! 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 clauses +! CHECK: not yet implemented: Reduction in OpenMP parallel construct subroutine reduction_parallel integer :: x !$omp parallel reduction(+:x)