This is an archive of the discontinued LLVM Phabricator instance.

[flang] Warn about dangerous actual argument association with TARGET dummy arguments
ClosedPublic

Authored by klausler on Mar 1 2023, 10:53 AM.

Details

Summary

The actual argument associated with a dummy argument with the TARGET attribute is
not required to be itself a target or pointer, or even to be a variable, but in
those cases, any pointer that is associated with the dummy argument during the
execution of the procedure is either going to be invalid afterwards because it
points to temporary storage that has since been deallocated or an optimization
time bomb because it aliases an object that isn't a target. Add warnings for
these cases.

Diff Detail

Event Timeline

klausler created this revision.Mar 1 2023, 10:53 AM
Herald added a project: Restricted Project. · View Herald Transcript
klausler requested review of this revision.Mar 1 2023, 10:53 AM
vzakhari accepted this revision.Mar 1 2023, 11:00 AM

Thanks!

This revision is now accepted and ready to land.Mar 1 2023, 11:00 AM