[flang-commits] [flang] [flang][hlfir] Return function call result as AsExpr. (PR #67769)

Slava Zakharin via flang-commits flang-commits at lists.llvm.org
Fri Sep 29 12:21:36 PDT 2023


================
@@ -171,8 +171,11 @@ struct AsExprOpConversion : public mlir::OpConversionPattern<hlfir::AsExprOp> {
     fir::FirOpBuilder builder(rewriter, module);
     if (asExpr.isMove()) {
       // Move variable storage for the hlfir.expr buffer.
+      hlfir::Entity varEntity = hlfir::Entity{adaptor.getVar()};
+      varEntity = hlfir::derefPointersAndAllocatables(loc, builder, varEntity);
----------------
vzakhari wrote:

I must have been doing something wrong before.  It all works now.

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


More information about the flang-commits mailing list