[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
Tue Mar 17 19:17:10 PDT 2026
================
----------------
bonachea wrote:
I don't understand what purpose this `else` case is serving.
Unless I'm misunderstanding something, the compiler should never be implicitly generating code to automatically deallocate a non-allocatable coarray. Non-allocatable coarrays are effectively SAVE and never deallocated; also IIUC they should never reach this point once line 688 is corrected. (Here I'm ignoring non-allocatable coarray dummy arguments and associate names, which also never cause coarray deallocation). So I don't see why we'd ever want a `mif::DeallocCoarrayOp` for a non-allocatable coarray.
What is the valid use case that reaches this else case? Perhaps a comment here would help? Or perhaps the else case should just be a fatal error?
https://github.com/llvm/llvm-project/pull/182110
More information about the llvm-commits
mailing list