This is an archive of the discontinued LLVM Phabricator instance.

[flang] Consolidate and enhance pointer assignment checks
ClosedPublic

Authored by klausler on Mar 21 2023, 3:12 PM.

Details

Summary

Consolidate aspects of pointer assignment & structure constructor pointer component
checking from Semantics/assignment.cpp and /expression.cpp into /pointer-assignment.cpp,
and add a warning about data targets that are not definable objects
but not hard errors. Specifically, a structure component pointer component data
target is not allowed to be a USE-associated object in a pure context by a numbered
constraint, but the right-hand side data target of a pointer assignment statement
has no such constraint, and that's the new warning.

Diff Detail

Event Timeline

klausler created this revision.Mar 21 2023, 3:12 PM
Herald added a project: Restricted Project. · View Herald Transcript
klausler requested review of this revision.Mar 21 2023, 3:12 PM
PeteSteinfeld accepted this revision.Mar 21 2023, 5:04 PM

All builds and tests correctly and looks good.

This revision is now accepted and ready to land.Mar 21 2023, 5:04 PM