This is an archive of the discontinued LLVM Phabricator instance.

[flang] Better error message for NULL() actual argument for dummy allocatable
ClosedPublic

Authored by klausler on Jul 22 2022, 12:08 PM.

Details

Summary

f18 intentionally does not support the spottily-implemented language extension
in which one can pass NULL() for an allocatable dummy argument. This is perhaps
a sanctioned side effect in other compilers of the fact that they pass distinct
"base address" and "descriptor address" physical arguments.

Make the error message in this case more specific to the circumstances, and
add a note to Extensions.md to clarify that this behavior is intended.

(We could, with some effort in lowering, support passing NULL for an INTENT(IN)
allocatable dummy, but let's see whether such nonconforming usage appears
in a real application before spending any more time on it.)

Diff Detail

Event Timeline

klausler created this revision.Jul 22 2022, 12:08 PM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: jdoerfert. · View Herald Transcript
klausler requested review of this revision.Jul 22 2022, 12:08 PM
jeanPerier accepted this revision.Jul 25 2022, 7:29 AM

Thanks

This revision is now accepted and ready to land.Jul 25 2022, 7:29 AM