[flang] Pointers returned from functions are not definable as pointers
authorPeter Klausler <pklausler@nvidia.com>
Wed, 8 Feb 2023 21:31:25 +0000 (13:31 -0800)
committerPeter Klausler <pklausler@nvidia.com>
Mon, 13 Feb 2023 23:59:02 +0000 (15:59 -0800)
commit30d932305567e7f3d9018db3fd25060ae5c16cd5
tree62ecd32787047b79506431e2e888705da0cf95b5
parent632fd9fb861c5deb24a6339d76f29a22462cadd8
[flang] Pointers returned from functions are not definable as pointers

A reference to a pointer-valued function is a "variable" in the argot of
the Fortran standard, and can be the left-hand side of an assignment
statement or passed as a definable actual argument -- but it is not a
definable pointer, and cannot be associated with a pointer dummy argument
that is not INTENT(IN).

Differential Revision: https://reviews.llvm.org/D143827
flang/lib/Semantics/definable.cpp
flang/test/Semantics/definable04.f90 [new file with mode: 0644]