[flang] Deallocate INTENT(OUT) dummy allocatable components (#69164)
Non POINTER/ALLOCATABLE INTENT(OUT) dummy arguments with allocatable components were reset without a proper deallocation if needed. Add a call to Destroy runtime to deallocate the components on entry. Notes: 1. The same logic is not needed on the callee side of BIND(C) call because BIND(C) arguments cannot be derived type with allocatable components (C1806). 2. When the argument is an INTENT(OUT) polymorphic, the dynamic type of the actual may contain allocatable components. This case is covered by the call to Destroy that uses dynamic type and was already inserted for INTENT(OUT) polymorphic dummies.
parent
041a786c
Please register or sign in to comment