[flang] Stricter interface compatibility checking for TBP overrides
authorPeter Klausler <pklausler@nvidia.com>
Tue, 21 Feb 2023 00:11:04 +0000 (16:11 -0800)
committerPeter Klausler <pklausler@nvidia.com>
Thu, 2 Mar 2023 18:20:33 +0000 (10:20 -0800)
commita3c6a7d53d21e09a45171c47456a33d89bc47738
tree43da73b619dab9c41d6e8233722bf3b3f254df95
parent2216c4c6a4e29a945af75f02b9a733ac5b016ed7
[flang] Stricter interface compatibility checking for TBP overrides

The compiler currently ignores attributes for PASS dummy arguments that
are incompatible between a type-bound procedure in an extended type and
the binding of the same name that it overrides in an ancestor type,
if any.  Strengthen this checking so that discrepancies between attributes
and intents are caught, and add some tests.

Differential Revision: https://reviews.llvm.org/D145110
flang/lib/Evaluate/characteristics.cpp
flang/lib/Semantics/check-declarations.cpp
flang/test/Semantics/bindings04.f90 [new file with mode: 0644]