[flang] Correct overriding (or not) of inaccessible bindings
authorPeter Klausler <pklausler@nvidia.com>
Tue, 16 May 2023 19:33:29 +0000 (12:33 -0700)
committerPeter Klausler <pklausler@nvidia.com>
Tue, 16 May 2023 21:32:48 +0000 (14:32 -0700)
commit7f7bbc73175d94f63cba905191a4ecc341b9fdba
treec5a1f8b0630f29acd28524a9c47297984f7e2d6b
parentfcaccf817d31d39096f7d0e7014cd6fe2fa3a683
[flang] Correct overriding (or not) of inaccessible bindings

Fortran doesn't allow inaccessible procedure bindings to be
overridden, and this needs to apply to generic resolution.
When resolving a type-bound generic procedure from another
module, ensure only that the most extended override from its
module is used if it is PRIVATE, not a later apparent override
from another module.

Differential Revision: https://reviews.llvm.org/D150721
flang/include/flang/Semantics/symbol.h
flang/lib/Lower/Bridge.cpp
flang/lib/Lower/ConvertCall.cpp
flang/lib/Semantics/expression.cpp
flang/lib/Semantics/runtime-type-info.cpp
flang/lib/Semantics/symbol.cpp
flang/lib/Semantics/tools.cpp
flang/test/Semantics/bindings05.f90 [new file with mode: 0644]
flang/test/Semantics/bindings06.f90 [new file with mode: 0644]
flang/test/Semantics/bindings07.f90 [new file with mode: 0644]