This is an archive of the discontinued LLVM Phabricator instance.

[flang] Deal with NULL() passed as actual arg to unlimited polymorphic dummy
ClosedPublic

Authored by clementval on Jan 20 2023, 5:09 AM.

Details

Summary

NULL() passed as actual argument to a procedure with an optional
dummy argument is represented with fir.box<none> type. When the dummy
argument is polymoprhic or unlimited polymorphic, the SelectOp will complain
if the types of the two arguments are not identical. Add a conversion from
fir.box<none> to fir.class<none> in that case.
Other situations with optional will require a fir.rebox and will be done in
a follow up patch.

Diff Detail

Event Timeline

clementval created this revision.Jan 20 2023, 5:09 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJan 20 2023, 5:09 AM
clementval requested review of this revision.Jan 20 2023, 5:09 AM
PeteSteinfeld edited the summary of this revision. (Show Details)Jan 20 2023, 6:39 AM
PeteSteinfeld accepted this revision.Jan 20 2023, 6:49 AM

All builds and tests correctly and looks good.

This revision is now accepted and ready to land.Jan 20 2023, 6:49 AM

All builds and tests correctly and looks good.

This revision was landed with ongoing or failed builds.Jan 23 2023, 12:50 AM
This revision was automatically updated to reflect the committed changes.