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

via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 3 06:36:39 PST 2026


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

What about implicit deallocation of allocatable at the end of the scope (if it applies to coarrays)?
It looks like `genDeallocateIfAllocated` would be called here.

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


More information about the llvm-commits mailing list