[flang-commits] [flang] [flang] emit declare for function result before call (PR #177615)

Slava Zakharin via flang-commits flang-commits at lists.llvm.org
Fri Jan 23 09:47:02 PST 2026


================
@@ -1073,6 +1077,17 @@ extendedValueToHlfirEntity(mlir::Location loc, fir::FirOpBuilder &builder,
         builder, loc, storage, /*mustFree=*/builder.createBool(loc, false));
     return hlfir::EntityWithAttributes{asExpr.getResult()};
   }
+  // TODO: better scoping model in FIR.
+  // The declare for result storage allocated on the callee side must be
+  // currently be emitted before the call so that MLIR level inlining does not
----------------
vzakhari wrote:

typo:
```
  // ... must be
  // currently be
```

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


More information about the flang-commits mailing list