[flang-commits] [flang] [llvm] [flang][MIF] Adding lowering for EVENT POST/WAIT statements (PR #210283)

via flang-commits flang-commits at lists.llvm.org
Thu Oct 22 22:56:12 PDT 2026


================
@@ -195,7 +195,16 @@ class AssignOpConversion : public mlir::OpRewritePattern<hlfir::AssignOp> {
       // Use the runtime for simplicity. An optimization pass will be added to
       // inline array assignment when profitable.
       mlir::Value from = emboxRHS(rhsExv);
-      mlir::Value to = fir::getBase(builder.createBox(loc, lhsExv));
+      mlir::Value to;
+      // A nonallocable coarray has an allocable descriptor and reallocation
+      // must not happen so we want to have a descriptor without the
+      // “allocatable” attribute
+      if (fir::getBoxCorank(lhs.getType()) > 0) {
+        fir::ExtendedValue readLhs =
+            fir::factory::readBoxValue(builder, loc, fir::getBase(lhsExv));
----------------
MattPD wrote:

Thanks, 931c148a fixes all three cases in my local build.

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


More information about the flang-commits mailing list