[flang] [llvm] [Flang] Adding lowering for the allocation and deallocation of coarrays (PR #182110)

Dan Bonachea via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 5 21:01:44 PST 2026


================
@@ -1132,6 +1134,22 @@ static void instantiateLocal(Fortran::lower::AbstractConverter &converter,
       });
     }
   }
+  if (Fortran::evaluate::IsCoarray(var.getSymbol()) &&
+      !Fortran::semantics::IsAllocatableOrPointer(var.getSymbol()) &&
----------------
bonachea wrote:

>  I can add a function that calls mif::DeallocCoarrayOp at the end of a scope, 

Thanks @JDPailleux!

Will you please also clarify in a comment what case this patch hunk is handling? (unless it's just dead code, in which case it should be removed)

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


More information about the llvm-commits mailing list