[flang] Use genExprBox for the rhs when calling PointerAssociate for unlimited polymo...
authorValentin Clement <clementval@gmail.com>
Thu, 1 Dec 2022 10:12:01 +0000 (11:12 +0100)
committerValentin Clement <clementval@gmail.com>
Thu, 1 Dec 2022 10:12:24 +0000 (11:12 +0100)
commit131585ab0fd0ed43d6fd7325ff75d6fa6e623a4b
tree1d0757ee4bbf34367ae9335ea1b7c84940bf7512
parent436c8f4420a62e7d3601693f4097bc6e6a5ee9f4
[flang] Use genExprBox for the rhs when calling PointerAssociate for unlimited polymorphic pointer

In D139019 the assumption was made that the rhs was also the MutableBox
but this is not a constraint. Use genExprBox instead. Also the allowed
conversion in D139019 was not correct. Remoed it since it is not needed anymore.

Reviewed By: jeanPerier

Differential Revision: https://reviews.llvm.org/D139081
flang/include/flang/Optimizer/Dialect/FIRType.h
flang/lib/Lower/Bridge.cpp
flang/lib/Optimizer/Dialect/FIROps.cpp
flang/lib/Optimizer/Dialect/FIRType.cpp
flang/test/Lower/polymorphic.f90