Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions flang-rt/lib/runtime/assign.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,9 @@ RT_API_ATTRS int AssignTicket::Begin(WorkQueue &workQueue) {
return status;
}
} else if (!toDerived_->noDestructionNeeded()) {
// F'2023 9.7.3.2 p7: "When an intrinsic assignment statement (10.2.1.3)
// is executed, any noncoarray allocated allocatable subobject of the
// variable is deallocated before the assignment takes place."
if (int status{
workQueue.BeginDestroy(to_, *toDerived_, /*finalize=*/false)};
status != StatOk && status != StatContinue) {
Expand Down
Loading