[flang-commits] [flang] [flang] Refine handling of NULL() actual to non-optional allocatable … (PR #116126)

Peter Klausler via flang-commits flang-commits at lists.llvm.org
Fri Nov 15 07:53:31 PST 2024


klausler wrote:

Daniel and I are trying to figure that out.  The question hinges on whether `NULL(MOLD=allocatable)` is definable or not.  If it is, then yes, we'll have to clean up after it.  But this patch is valid if `NULL(MOLD=allocatable)` is not definable, as it would still be conforming to associate it with a dummy argument with default intent, so long as it is not defined.

(If the result of that `NULL` is definable, then we have to figure out its lifetime -- the standard is silent -- and what other contexts in which it may appear besides an actual argument.  And this patch will need to change so that any intent is allowed.)

And this feature only works with XLF, and maybe we'll decide that it's not worth preserving.

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


More information about the flang-commits mailing list