llvm-project
5f6e0f35 - [flang][runtime] Destroy nested allocatable components (#81117)

Commit
1 year ago
[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.
Author
Parents
Loading