Files
clang-p2996/flang/lib/Lower/ConvertCall.cpp
Slava Zakharin ab340f97f9 [flang][hlfir] Support passing polymorphic expr for non-polymorphic dummy.
The actual polymorphic expression argument that is passed to a non-polymorphic
contiguous dummy has to be made a contiguous entity with the dynamic type
matching the declared type of the dummy argument.
The solution is to associate the expression with a temporary of the dynamic
type of the expression, then rebox the temporary to the declared type
of the dummy argument, and then, if necessary, make copy-in into another
temporary that is, finally, a contiguous entity with the required dynamic type.

With this change a single prepared argument may have up to two associated
clean-ups, so I had to change the clean-ups handling.

Reviewed By: tblah

Differential Revision: https://reviews.llvm.org/D157464
2023-08-09 09:24:16 -07:00

97 KiB