[flang-commits] [flang] [flang] Guard absent optional operands in elemental character MIN/MAX (PR #191244)

Sairudra More via flang-commits flang-commits at lists.llvm.org
Fri Apr 10 22:30:16 PDT 2026


================
@@ -465,7 +465,55 @@ mlir::Value HlfirCharExtremumLowering::lowerImpl(
     const Fortran::lower::PreparedActualArguments &loweredActuals,
     const fir::IntrinsicArgumentLoweringRules *argLowering,
     mlir::Type stmtResultType) {
-  auto operands = getOperandVector(loweredActuals, argLowering);
+  // Check whether any argument is dynamically optional.  When an optional
----------------
Saieiei wrote:

Thanks, I reworked this in that direction. The fix is now in `ConvertCall.cpp`, so the elemental path goes through the custom handling path instead of trying to handle it in `HlfirCharExtremumLowering`

https://github.com/llvm/llvm-project/pull/191244


More information about the flang-commits mailing list