[all-commits] [llvm/llvm-project] 0d0bd3: [flang] Deep copy nested allocatable components in...
jeanPerier via All-commits
all-commits at lists.llvm.org
Thu Feb 15 00:05:45 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0d0bd3ef55a2317c4254e97a3657e702bcf22214
https://github.com/llvm/llvm-project/commit/0d0bd3ef55a2317c4254e97a3657e702bcf22214
Author: jeanPerier <jperier at nvidia.com>
Date: 2024-02-15 (Thu, 15 Feb 2024)
Changed paths:
M flang/runtime/copy.cpp
M flang/runtime/derived.cpp
Log Message:
-----------
[flang] Deep copy nested allocatable components in transformational (#81736)
Spread, reshape, pack, and other transformational intrinsic runtimes are
using `CopyElement` utility to copy elements. This utility was dealing
with deep copies, but only when the allocatable components where
"immediate" components of the type being copied. If the allocatable
components were nested inside a nonpointer/nonallocatable component,
they were not deep copied, leading to bugs later when manipulating the
value (or double free when applying #81117).
Visit data components with allocatable components (using the
noDestructionNeeded flag to avoid expensive and useless type visit when
there are no such components).
More information about the All-commits
mailing list