[flang] Fix check for PRIVATE override of PUBLIC t.b.p.
authorPeter Klausler <pklausler@nvidia.com>
Wed, 15 Mar 2023 20:06:20 +0000 (13:06 -0700)
committerPeter Klausler <pklausler@nvidia.com>
Mon, 27 Mar 2023 22:43:43 +0000 (15:43 -0700)
commit2e0873c75ef8016a10e2052a1ce21e4fa5974cf3
tree2045f1e1e311943877a3c5391d0d76902fb1eff5
parent51d48a3e6609c17299a16e8e823af6901be23c11
[flang] Fix check for PRIVATE override of PUBLIC t.b.p.

A PRIVATE procedure binding in a derived type extension may not
be an override of a PUBLIC procedure binding.  Declaration checking
for this case was working only in the presence of an explicit
PUBLIC accessibility attribute, when it should be checking for the
absence of a PRIVATE accessibility attribute.

Differential Revision: https://reviews.llvm.org/D146577
flang/lib/Semantics/check-declarations.cpp
flang/test/Semantics/bindings01.f90