This is an archive of the discontinued LLVM Phabricator instance.

[flang] Catch and diagnose attempts to misuse NULL()
ClosedPublic

Authored by klausler on Oct 27 2022, 3:23 PM.

Details

Summary

Some intrinsic functions can handle NULL() as an actual argument; most
can't. Distinguish the two with a new ArgFlag facility in the intrinsic
procedure table. Also transform some confusing Optionality codes that
were standing in for flags into ArgFlags. Last, return false for a NULL()
pointer from the utility IsActuallyConstant(), ensuring that it can
still deal with a nested NULL() for components in structure constructors.

Diff Detail

Event Timeline

klausler created this revision.Oct 27 2022, 3:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 27 2022, 3:23 PM
Herald added a subscriber: jdoerfert. · View Herald Transcript
klausler requested review of this revision.Oct 27 2022, 3:23 PM
This revision is now accepted and ready to land.Oct 28 2022, 12:00 AM
This revision was automatically updated to reflect the committed changes.