This is an archive of the discontinued LLVM Phabricator instance.

[flang] Add conditional rebox when passing fir.box to optional fir.class
ClosedPublic

Authored by clementval on Jan 23 2023, 2:47 AM.

Details

Summary

When a !fir.box<> is passed as an actual argument to an optional
!fir.class<> dummy it needs a fir.rebox in order to propagate
the dynamic type information.
The fir.rebox needs to happen only on present argument.

Diff Detail

Event Timeline

clementval created this revision.Jan 23 2023, 2:47 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJan 23 2023, 2:47 AM
clementval requested review of this revision.Jan 23 2023, 2:47 AM
jeanPerier added inline comments.Jan 23 2023, 3:37 AM
flang/test/Lower/polymorphic.f90
801

There is a test failure here.

This revision is now accepted and ready to land.Jan 23 2023, 5:56 AM