This is an archive of the discontinued LLVM Phabricator instance.

[flang] Fix: use right symbol for parent component
ClosedPublic

Authored by klausler on Feb 1 2022, 4:59 PM.

Details

Summary

When constructing the representation for a component reference
to an inherited component, expression semantics make the parent
component references explicit in the DataRef; e.g., base%component
becomes base%parent%grandparent%component if component was
inheritance-associated through two levels. But expression semantics
was inserting references to the symbol table entries for the
intermediate types, not the symbols for the parent components in
the extended types. (We didn't notice the distinction until
recently because both symbols have the same name; this only
affects lowering.) Find and use the right symbols.

Diff Detail

Event Timeline

klausler created this revision.Feb 1 2022, 4:59 PM
klausler requested review of this revision.Feb 1 2022, 4:59 PM
vdonaldson accepted this revision.Feb 1 2022, 5:07 PM
This revision is now accepted and ready to land.Feb 1 2022, 5:07 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 2 2022, 10:49 AM