This is an archive of the discontinued LLVM Phabricator instance.

[flang] Admit NULL() in generic procedure resolution cases
ClosedPublic

Authored by klausler on Oct 14 2021, 4:03 PM.

Details

Summary

Semantics is rejecting valid programs with NULL() actual arguments
to generic interfaces, including user-defined operators. Subclause
16.9.144(para 6) makes clear that NULL() can be a valid actual
argument to a generic interface so long as it does not produce
ambiguity. This patch handles those cases, revises existing
tests, and adjust an error message about NULL() operands to
appear less like a blanket prohibition.

Diff Detail

Event Timeline

klausler created this revision.Oct 14 2021, 4:03 PM
klausler requested review of this revision.Oct 14 2021, 4:03 PM
PeteSteinfeld accepted this revision.Oct 14 2021, 4:19 PM

All builds, tests, and looks good.

This revision is now accepted and ready to land.Oct 14 2021, 4:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 14 2021, 4:23 PM