Skip to content

Commit 0f8bea5

Browse files
committed
[Flang] To address review comment to correct the resultType.
1 parent cc702b9 commit 0f8bea5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

flang/lib/Lower/ConvertExprToHLFIR.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1433,12 +1433,11 @@ class HlfirBuilder {
14331433
}
14341434

14351435
hlfir::EntityWithAttributes gen(const Fortran::evaluate::ProcedureRef &expr) {
1436-
fir::FirOpBuilder &builder = getBuilder();
14371436
Fortran::evaluate::ProcedureDesignator proc{expr.proc()};
14381437
auto procTy{Fortran::lower::translateSignature(proc, getConverter())};
1439-
mlir::Type resType = fir::BoxProcType::get(builder.getContext(), procTy);
1440-
auto result = Fortran::lower::convertCallToHLFIR(
1441-
getLoc(), getConverter(), expr, resType, getSymMap(), getStmtCtx());
1438+
auto result = Fortran::lower::convertCallToHLFIR(getLoc(), getConverter(),
1439+
expr, procTy.getResult(0),
1440+
getSymMap(), getStmtCtx());
14421441
assert(result.has_value());
14431442
return *result;
14441443
}

0 commit comments

Comments
 (0)