[flang] Don't add inherited procedures to generic binding
authorTim Keith <tkeith@nvidia.com>
Thu, 21 Mar 2019 00:00:26 +0000 (17:00 -0700)
committerTim Keith <tkeith@nvidia.com>
Fri, 29 Mar 2019 16:07:27 +0000 (09:07 -0700)
commitfdba48a74c24dbe9ef189ee3d0e24904fc7852a3
tree6697074530fc07b9d643e12b226e70618fa982ed
parent423b0e86065fd62550a46171be6a41729d93df10
[flang] Don't add inherited procedures to generic binding

In this example:
```
  type t1
  contains
    procedure, nopass :: s1
    generic :: foo => s1
  end type
  type, extends(t1) :: t2
  contains
    procedure, nopass :: s2
    generic :: foo => s2
  end type
```

The GenericBindingDetails for foo in t2 include both s1 and s2 as
specific procs. There is no way to distinguish between the binding in
the current type and the binding that was inherited. In particular,
the .mod file will have a binding for s1 in t2, so it won't match the
original source (for exampke, see the old version of modfile14.f90).

Original-commit: flang-compiler/f18@4e2c6be5cbdc5d31c41f0e44b85985b4fb69210d
Reviewed-on: https://github.com/flang-compiler/f18/pull/368
Tree-same-pre-rewrite: false
flang/lib/semantics/resolve-names.cc
flang/test/semantics/modfile14.f90