This is an archive of the discontinued LLVM Phabricator instance.

[flang] Enforce C1529 as a warning, C919 as an error
ClosedPublic

Authored by klausler on Dec 15 2022, 11:57 AM.

Details

Summary

Constraint C1529 requires that the base object of a type-bound procedure
reference be a scalar if the TBP has the NOPASS attribute. Most
compilers do not enforce this constraint and it does not appear to
have any implementation justification, so emit portability warning.

On the other hand, we fail to enforce C919 for references to
procedure pointer components, whose base objects must of course
be scalars in order to avoid ambiguity and empty arrays, whether
NOPASS is present or not.

Diff Detail

Event Timeline

klausler created this revision.Dec 15 2022, 11:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 15 2022, 11:57 AM
Herald added a subscriber: jdoerfert. · View Herald Transcript
klausler requested review of this revision.Dec 15 2022, 11:57 AM
This revision is now accepted and ready to land.Dec 15 2022, 11:58 AM
This revision was automatically updated to reflect the committed changes.