This is an archive of the discontinued LLVM Phabricator instance.

[flang] If it's got an argument keyword, it can't become an array reference
ClosedPublic

Authored by klausler on Jan 27 2023, 9:49 AM.

Details

Summary

Array references like A(1) are commonly misparsed as function references,
since the parser has almost no semantic context, and the parse tree is
fixed up later by semantics once it can be disambiguated. In a case
like A(I=1), however, the presence of an argument keyword must prevent
conversion into an array reference. (It might still also be a structure
constructor.)

Diff Detail

Event Timeline

klausler created this revision.Jan 27 2023, 9:49 AM
Herald added a project: Restricted Project. · View Herald Transcript
klausler requested review of this revision.Jan 27 2023, 9:49 AM
vdonaldson accepted this revision.Jan 27 2023, 11:46 AM
This revision is now accepted and ready to land.Jan 27 2023, 11:46 AM