[flang] Keep a fir.box type when doing an array of derived type component
authorValentin Clement <clementval@gmail.com>
Tue, 24 Jan 2023 15:37:52 +0000 (16:37 +0100)
committerValentin Clement <clementval@gmail.com>
Tue, 24 Jan 2023 18:45:33 +0000 (19:45 +0100)
commit62aa19a5a529b972e6e0d92c57ff773daddd22a2
tree25c85f796c3b27ab60d3c65f85879d8a5f4d3e80
parent33ecc8a9b8b0584f13d849d7810e2fceca8d6be3
[flang] Keep a fir.box type when doing an array of derived type component

When referencing a single component from a polymorphic array in an expression,
the rebox operation should output a boxed array of that component type and
not a polymorphic boxed array as it was done.

Reviewed By: PeteSteinfeld

Differential Revision: https://reviews.llvm.org/D142462
flang/lib/Lower/ConvertExpr.cpp
flang/test/Lower/polymorphic.f90