This is an archive of the discontinued LLVM Phabricator instance.

[flang] Add one missed semantic check for named constant in common block
ClosedPublic

Authored by peixin on Jun 1 2022, 2:44 AM.

Details

Summary

As Fortran 2018 R874, common block object must be one variable name, which
cannot be one named constant. Add this check.

Diff Detail

Event Timeline

peixin created this revision.Jun 1 2022, 2:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 1 2022, 2:44 AM
Herald added a subscriber: jdoerfert. · View Herald Transcript
peixin requested review of this revision.Jun 1 2022, 2:44 AM
klausler added inline comments.Jun 1 2022, 9:23 AM
flang/lib/Semantics/resolve-names.cpp
5344

IsNamedConstant is a more readable alternative.

peixin updated this revision to Diff 433622.Jun 1 2022, 6:59 PM
peixin added inline comments.
flang/lib/Semantics/resolve-names.cpp
5344

Right. Thanks for the notice. Fixed.

klausler accepted this revision.Jun 7 2022, 8:43 AM
This revision is now accepted and ready to land.Jun 7 2022, 8:43 AM