[flang-commits] [flang] [Flang] Avoid crash when a function return is undefined (PR #151577)

Carlos Seo via flang-commits flang-commits at lists.llvm.org
Fri Aug 1 06:36:51 PDT 2025


================
@@ -1733,6 +1733,13 @@ class FirConverter : public Fortran::lower::AbstractConverter {
     mlir::Location loc = toLocation();
     if (!resultSymBox) {
       mlir::emitError(loc, "internal error when processing function return");
----------------
ceseo wrote:

Hm... I think you may be right. Returning `undef` and emitting a warning seems the right thing to do.

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


More information about the flang-commits mailing list