[flang] Document and warn about an extension
authorPeter Klausler <pklausler@nvidia.com>
Thu, 1 Dec 2022 18:13:57 +0000 (10:13 -0800)
committerPeter Klausler <pklausler@nvidia.com>
Sat, 3 Dec 2022 19:09:59 +0000 (11:09 -0800)
commitfee041f69de071cf813c332abc8be279ff7c0bb7
tree1d8270d34c6d776a52b2b1363b16bbf791384502
parent61cb96404ed27a95df9296460d9920e8c13379e5
[flang] Document and warn about an extension

Standard Fortran allows type-bound procedure bindings to only
be called, and disallows them from being used in other contexts
where a procedure name can be: as the target of a procedure pointer
assignment statement, and as an actual argument that corresponds
to a dummy procedure.  So long as the interfaces match, there's
no good reason for these uses to be errors, and there some obvious
use cases in polymorphic programming.  So emit portability warnings
rather than errors, and document this usage as an extension.

Differential Revision: https://reviews.llvm.org/D139127
flang/docs/Extensions.md
flang/lib/Semantics/check-call.cpp
flang/lib/Semantics/pointer-assignment.cpp
flang/test/Semantics/bindings03.f90 [new file with mode: 0644]