Skip to content

Commit fcf27ed

Browse files
Add missing casts in runtime argument preparation
1 parent b3c5d26 commit fcf27ed

File tree

1 file changed

+4
-2
lines changed
  • flang/include/flang/Optimizer/Builder/Runtime

1 file changed

+4
-2
lines changed

flang/include/flang/Optimizer/Builder/Runtime/RTBuilder.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -829,14 +829,16 @@ template <int N, typename A>
829829
void createArguments(llvm::SmallVectorImpl<mlir::Value> &result,
830830
fir::FirOpBuilder &builder, mlir::Location loc,
831831
mlir::FunctionType fTy, A arg) {
832-
result.emplace_back(builder.createConvert(loc, fTy.getInput(N), arg));
832+
result.emplace_back(
833+
builder.createConvertWithVolatileCast(loc, fTy.getInput(N), arg));
833834
}
834835

835836
template <int N, typename A, typename... As>
836837
void createArguments(llvm::SmallVectorImpl<mlir::Value> &result,
837838
fir::FirOpBuilder &builder, mlir::Location loc,
838839
mlir::FunctionType fTy, A arg, As... args) {
839-
result.emplace_back(builder.createConvert(loc, fTy.getInput(N), arg));
840+
result.emplace_back(
841+
builder.createConvertWithVolatileCast(loc, fTy.getInput(N), arg));
840842
createArguments<N + 1>(result, builder, loc, fTy, args...);
841843
}
842844
} // namespace helper

0 commit comments

Comments
 (0)