This is an archive of the discontinued LLVM Phabricator instance.

[flang] Silence bogus error on use after IMPORT
ClosedPublic

Authored by klausler on Feb 1 2022, 5:01 PM.

Details

Summary

When a scope uses an explicit IMPORT statement to import a
symbol from the scope's host, it should not emit a bogus error
message later if that symbol is used in a specification construct.
The code that checks for imports being hidden by local declarations
was not allowing for the presence of host association (or USE)
indirection symbols in the local scope. Fix by using GetUltimate()
before checking for the hidden symbol.

Diff Detail

Event Timeline

klausler created this revision.Feb 1 2022, 5:01 PM
klausler requested review of this revision.Feb 1 2022, 5:01 PM
PeteSteinfeld accepted this revision.Feb 1 2022, 6:24 PM

Looks great! Thanks for doing this.

This revision is now accepted and ready to land.Feb 1 2022, 6:24 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 2 2022, 11:16 AM