[flang-commits] [flang] [flang] Make adapt.valuebyref attribute work again (PR #73658)

Mats Petersson via flang-commits flang-commits at lists.llvm.org
Tue Nov 28 12:37:38 PST 2023


================
@@ -259,8 +260,11 @@ hlfir::AssociateOp hlfir::genAssociateExpr(mlir::Location loc,
   }
   llvm::SmallVector<mlir::Value> lenParams;
   genLengthParameters(loc, builder, value, lenParams);
-  return builder.create<hlfir::AssociateOp>(loc, source, name, shape, lenParams,
-                                            fir::FortranVariableFlagsAttr{});
+  auto res = builder.create<hlfir::AssociateOp>(
+      loc, source, name, shape, lenParams, fir::FortranVariableFlagsAttr{});
+  if (attr)
+    res->setAttrs({*attr});
----------------
Leporacanthicus wrote:

I have broken something trying to fix this. Will work on it tomorrow.

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


More information about the flang-commits mailing list