This is an archive of the discontinued LLVM Phabricator instance.

[flang] Do not query type_desc for unlimited polymoprhic entities in move_alloc
ClosedPublic

Authored by clementval on Mar 6 2023, 6:34 AM.

Details

Summary

In D144997, the dynamic type of polymorphic entities is reset to the declared
type when the FROM is deallocated. To do this, the declared type was passed as
a fir.type_desc op. For unlimited polymorphic entities, this should just be a
null pointer.

Diff Detail

Event Timeline

clementval created this revision.Mar 6 2023, 6:34 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 6 2023, 6:34 AM
clementval requested review of this revision.Mar 6 2023, 6:34 AM
PeteSteinfeld edited the summary of this revision. (Show Details)Mar 6 2023, 8:25 AM
PeteSteinfeld accepted this revision.Mar 6 2023, 8:52 AM

All builds and tests correctly and looks good.

This revision is now accepted and ready to land.Mar 6 2023, 8:52 AM
jeanPerier accepted this revision.Mar 6 2023, 8:57 AM

Makes sense to me.