This is an archive of the discontinued LLVM Phabricator instance.

[flang] Disallow pointer constants
ClosedPublic

Authored by PeteSteinfeld on Oct 16 2020, 11:50 AM.

Details

Summary

None of the other Fortran compilers allow them.

Diff Detail

Event Timeline

PeteSteinfeld created this revision.Oct 16 2020, 11:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 16 2020, 11:50 AM
PeteSteinfeld requested review of this revision.Oct 16 2020, 11:50 AM
PeteSteinfeld added a project: Restricted Project.Oct 16 2020, 11:51 AM
klausler accepted this revision.Oct 16 2020, 11:59 AM

Please add a comment that lays out our reasoning for the prohibition against combining PARAMETER and POINTER, since the standards do not explicitly preclude it. (The PARAMETER attribute requires a entity-decl to have an initialization that is a constant-expr, and the only form of initialization that allows a constant-expr is the one that's not a "=>" pointer initialization.) See C811, C807, & 8.5.13.

This revision is now accepted and ready to land.Oct 16 2020, 11:59 AM

Please add a comment that lays out our reasoning for the prohibition against combining PARAMETER and POINTER, since the standards do not explicitly preclude it. (The PARAMETER attribute requires a entity-decl to have an initialization that is a constant-expr, and the only form of initialization that allows a constant-expr is the one that's not a "=>" pointer initialization.) See C811, C807, & 8.5.13.

Thanks for the detailed reasoning. I'll add a comment.

This revision was landed with ongoing or failed builds.Oct 16 2020, 12:34 PM
This revision was automatically updated to reflect the committed changes.