This is an archive of the discontinued LLVM Phabricator instance.

[flang] Fix crash in semantics after PDT instantiation
ClosedPublic

Authored by klausler on May 21 2022, 10:13 PM.

Details

Summary

The code in semantics that reinitializes symbol table pointers in
the parse tree of a parameterized derived type prior to a new
instantiation of the type was processing the symbols of the
derived type instantiation scope in arbitrary address order,
which could fail if a reference to a type parameter inherited from
an ancestor type was processed prior to the parent component sequence.
Fix by instantiating components of PDT instantiations in declaration
order.

Diff Detail

Event Timeline

klausler created this revision.May 21 2022, 10:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 21 2022, 10:13 PM
Herald added a subscriber: jdoerfert. · View Herald Transcript
klausler requested review of this revision.May 21 2022, 10:13 PM
vdonaldson accepted this revision.May 23 2022, 10:25 AM
This revision is now accepted and ready to land.May 23 2022, 10:25 AM
This revision was automatically updated to reflect the committed changes.