This is an archive of the discontinued LLVM Phabricator instance.

[flang] Create HostAssocDetails symbols when needed for mis-parsed ArrayRef
ClosedPublic

Authored by jeanPerier on Jul 6 2021, 1:05 AM.

Details

Summary

Name resolution is always creating symbols with HostAssocDetails
for host variable names inside internal procedures. This helps lowering
identifying and dealing with such variables inside internal procedures.

However, the case where the variable appears in an ArrayRef mis-parsed
as a FunctionRef goes through a different name resolution path that did
not create such HostAssocDetails when needed. Pointer assignment RHS
are also skipping this path.

Add the logic to create HostAssocDetails for host symbols inisde internal
procedures that appear in mis-parsed ArrayRef or in pointer assignment RHS.

Diff Detail

Event Timeline

jeanPerier created this revision.Jul 6 2021, 1:05 AM
jeanPerier requested review of this revision.Jul 6 2021, 1:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 6 2021, 1:05 AM
PeteSteinfeld accepted this revision.Jul 6 2021, 7:32 AM

All builds, tests, and looks good.

flang/lib/Semantics/resolve-names.cpp
6598

This should be "name is known" rather than "name is know".

This revision is now accepted and ready to land.Jul 6 2021, 7:32 AM
jeanPerier updated this revision to Diff 356729.Jul 6 2021, 8:05 AM

Fix typo in comment.

jeanPerier marked an inline comment as done.Jul 6 2021, 8:05 AM
klausler accepted this revision.Jul 6 2021, 9:28 AM
This revision was landed with ongoing or failed builds.Jul 7 2021, 1:08 AM
This revision was automatically updated to reflect the committed changes.