This is an archive of the discontinued LLVM Phabricator instance.

[flang] Rework name resolution of Cray pointer declarations
ClosedPublic

Authored by klausler on Jun 20 2023, 3:49 PM.

Details

Summary

The current code has redundancy with the infrastructure for
declaration checking that can be replaced by better usage of
the parse tree walking framework. This also fixes LLVM flang
bug #58971.

Diff Detail

Event Timeline

klausler created this revision.Jun 20 2023, 3:49 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 20 2023, 3:49 PM
klausler requested review of this revision.Jun 20 2023, 3:49 PM
PeteSteinfeld accepted this revision.Jun 20 2023, 5:16 PM

Aside fromt the question, all builds and tests correctly and looks good.

flang/test/Semantics/resolve61.f90
73

This error used to have a more accurate message. Now we seem to be treating the appearance of t in a pointer statement as a redeclaration. This seems OK to me, but I just wanted to make sure that this is what you intended.

This revision is now accepted and ready to land.Jun 20 2023, 5:16 PM
klausler added inline comments.Jun 21 2023, 6:11 AM
flang/test/Semantics/resolve61.f90
73

It's good, and it's the right message for situations where a name gets declared more than once in a scope and is not one of the two cases where Fortran allows it.

Matt added a subscriber: Matt.Jun 21 2023, 11:42 AM