[llvm] [Flang-rt] Implement same behavior as -O3 for zero-length arrays (PR #171480)
Michael Klemm via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 9 12:25:19 PST 2025
================
@@ -366,7 +366,7 @@ RT_API_ATTRS int AssignTicket::Begin(WorkQueue &workQueue) {
"assignment to unallocated allocatable",
to_.rank(), from_->rank());
}
- } else if (!to_.IsAllocated()) {
+ } else if (!to_.IsAllocated() && to_.Elements()) {
workQueue.terminator().Crash(
"Assign: left-hand side variable is neither allocated nor allocatable");
----------------
mjklemm wrote:
I totally agree. But Copilot tried hard to improve it :-)
https://github.com/llvm/llvm-project/pull/171480
More information about the llvm-commits
mailing list