[flang][hlfir] Support box in user defined assignments (#77578)
commit3643d11988d6b14171b4320cbdfb15aba9764d0b
authorjeanPerier <jperier@nvidia.com>
Thu, 11 Jan 2024 07:50:35 +0000 (11 08:50 +0100)
committerGitHub <noreply@github.com>
Thu, 11 Jan 2024 07:50:35 +0000 (11 08:50 +0100)
tree01c9290e8368099d0d9e40549d171933d237c419
parent1a5792735aa0bb10e5624a438bcf7fd5091ee265
[flang][hlfir] Support box in user defined assignments (#77578)

When dealing with overlaps in user defined assignments, some entities
with descriptors (fir.box) may be saved without descriptors. The current
code was replacing the original box entity with the "raw" copy with a
simple cast instead of creating a box for the copy. This patch ensures a
fir.embox is emitted instead.
flang/lib/Optimizer/HLFIR/Transforms/LowerHLFIROrderedAssignments.cpp
flang/test/HLFIR/order_assignments/user-defined-assignment.fir