[flang] Fix emboxing when input type is directly a record type
authorValentin Clement <clementval@gmail.com>
Tue, 10 Jan 2023 16:08:33 +0000 (17:08 +0100)
committerValentin Clement <clementval@gmail.com>
Tue, 10 Jan 2023 16:08:55 +0000 (17:08 +0100)
commitdbee2030a5651d76b543f2b3275489c3e049df05
treea61ad0b835e9fe7f7b62656c442225cd0fc08bbb
parente43295209bb86e93008363c66c1277c7d8bb148c
[flang] Fix emboxing when input type is directly a record type

In some fir.embox cases as shown in the test, the type descriptor
was not correctly found and the descriptor was populated with a null in the
addendum. This patch fixes this issue.

Reviewed By: PeteSteinfeld

Differential Revision: https://reviews.llvm.org/D141383
flang/lib/Optimizer/Dialect/FIRType.cpp
flang/test/Fir/polymorphic.fir