This is an archive of the discontinued LLVM Phabricator instance.

[flang] Allow more forward references to ENTRY names
ClosedPublic

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

Details

Summary

Forward references to ENTRY names to pass them as actual procedure arguments
don't work in all cases, exposing some basic ordering problems in
name resolution for these symbols. Refactor; create all the
necessary procedure symbols, and either function result or host association
symbols (for subroutines), at the time that the subprogrma scope is
created, so that the names exist in the scope as text "before"
the ENTRY is processed in name resolution. Some processing
remains in PostEntryStmt() so that we can check that an ENTRY with
an explicit distinct RESULT doesn't also have declarations for the
ENTRY name.

Diff Detail

Event Timeline

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