[flang] Don't resolve names in derived type definitions to generics
authorPeter Klausler <pklausler@nvidia.com>
Wed, 21 Sep 2022 19:03:54 +0000 (12:03 -0700)
committerPeter Klausler <pklausler@nvidia.com>
Fri, 23 Sep 2022 17:56:24 +0000 (10:56 -0700)
commit811aafcbf57e2933982b978492f2a5367c3a9f99
tree7915ab01e78771fafb5a21b75ed5302509827e84
parent465ec4e0b48c005f5d5de8adee0c33469a7b9862
[flang] Don't resolve names in derived type definitions to generics

There's code in name resolution that handles resolution of references
that appear in the definitions of derived types -- it checks for
existing components in the type being defined, as well as for
non-parent components in its ancestors.  Special case code prevents
resolution of a name to the symbol of a procedure binding.  This
code needs to be extended so that names of generic procedures
are similarly prevented from shadowing symbols in the scope around
the type.

Differential Revision: https://reviews.llvm.org/D134398
flang/lib/Semantics/resolve-names.cpp
flang/test/Semantics/symbol23.f90 [new file with mode: 0644]