This is an archive of the discontinued LLVM Phabricator instance.

[flang] Fix crash on SELECT RANK
ClosedPublic

Authored by klausler on Feb 10 2023, 1:58 PM.

Details

Summary

In some circumstances, such as in compile-time array shape analysis,
clients of the utility function ResolveAssociations() don't really
want it to drill all of the way down to an assumed-rank dummy argument.
Add a variation, ResolveAssociationsExceptSelectRank(), that
will return a specific rank case's AssocEntity symbol instead.
This fixes a crash in subscript validation checking that stemmed from
deducing an incorrect number of lower and upper bound expressions
from a specific rank case association entity.

Diff Detail

Event Timeline

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