[flang] Fix code generation for polymorphic deallocation
authorValentin Clement <clementval@gmail.com>
Mon, 31 Oct 2022 15:33:45 +0000 (16:33 +0100)
committerValentin Clement <clementval@gmail.com>
Mon, 31 Oct 2022 15:34:06 +0000 (16:34 +0100)
commit2406ba1563d5d2805cee1d41c29f2837e2fd5bd7
tree26321e4746b52354221023046c48839bf7137455
parent6ca33cb925edf17fa837b773cf3cfdd922a0e88f
[flang] Fix code generation for polymorphic deallocation

This patch fix issues found during call to deallocate.
fir.class can be handled the same way as fir.box in fir.store operation
code generation. In MutableBox::createNewFirBox, the fir.class is
also already a boxed entity.

Reviewed By: PeteSteinfeld

Differential Revision: https://reviews.llvm.org/D137079
flang/lib/Optimizer/Builder/MutableBox.cpp
flang/lib/Optimizer/CodeGen/CodeGen.cpp
flang/test/Lower/allocatable-polymorphic.f90