[all-commits] [llvm/llvm-project] 5f6e0f: [flang][runtime] Destroy nested allocatable compon...
jeanPerier via All-commits
all-commits at lists.llvm.org
Thu Feb 15 00:04:54 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5f6e0f35f936495563b5758a7ff9d4417a9f651b
https://github.com/llvm/llvm-project/commit/5f6e0f35f936495563b5758a7ff9d4417a9f651b
Author: jeanPerier <jperier at nvidia.com>
Date: 2024-02-15 (Thu, 15 Feb 2024)
Changed paths:
M flang/runtime/assign.cpp
M flang/runtime/derived.cpp
Log Message:
-----------
[flang][runtime] Destroy nested allocatable components (#81117)
The runtime was currently only deallocating the direct allocatable
components, which caused leaks when there are allocatable components
nested in the direct components.
Update Destroy to recursively destroy components.
Also call Destroy from Assign to deallocate nested allocatable
components before doing the assignment as required by F2018 9.7.3.2
point 7.
This lack of deallocation was visible if the nested components had user
defined assignment "observing" the allocation state.
More information about the All-commits
mailing list