aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Lower/OpenMP.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'flang/lib/Lower/OpenMP.cpp')
-rw-r--r--flang/lib/Lower/OpenMP.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/flang/lib/Lower/OpenMP.cpp b/flang/lib/Lower/OpenMP.cpp
index 93cb936..c374012 100644
--- a/flang/lib/Lower/OpenMP.cpp
+++ b/flang/lib/Lower/OpenMP.cpp
@@ -254,8 +254,10 @@ genOMP(Fortran::lower::AbstractConverter &converter,
if (const auto &ifClause =
std::get_if<Fortran::parser::OmpClause::If>(&clause.u)) {
auto &expr = std::get<Fortran::parser::ScalarLogicalExpr>(ifClause->v.t);
- ifClauseOperand = fir::getBase(
+ mlir::Value ifVal = fir::getBase(
converter.genExprValue(*Fortran::semantics::GetExpr(expr), stmtCtx));
+ ifClauseOperand = firOpBuilder.createConvert(
+ currentLocation, firOpBuilder.getI1Type(), ifVal);
} else if (const auto &numThreadsClause =
std::get_if<Fortran::parser::OmpClause::NumThreads>(
&clause.u)) {