[all-commits] [llvm/llvm-project] 8e674e: [flang] Deallocate INTENT(OUT) dummy allocatable c...
jeanPerier via All-commits
all-commits at lists.llvm.org
Mon Oct 16 23:48:27 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8e674e8a01314597770563041b61cc5c85680d32
https://github.com/llvm/llvm-project/commit/8e674e8a01314597770563041b61cc5c85680d32
Author: jeanPerier <jperier at nvidia.com>
Date: 2023-10-17 (Tue, 17 Oct 2023)
Changed paths:
M flang/lib/Lower/ConvertVariable.cpp
A flang/test/Lower/HLFIR/intentout-allocatable-components.f90
Log Message:
-----------
[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.
More information about the All-commits
mailing list