[flang] Fix bug merging generics on USE
authorTim Keith <tkeith@nvidia.com>
Fri, 13 Sep 2019 00:38:40 +0000 (17:38 -0700)
committerTim Keith <tkeith@nvidia.com>
Fri, 13 Sep 2019 00:38:40 +0000 (17:38 -0700)
commitd43405e4e6d4af8fe5e1d660ceed05f74bb62633
tree4c1f363550cf70a289bccf35f4022fbe1728dafa
parent6f9ae14b27c356db6aa81f03cd2a1445a2272ed7
[flang] Fix bug merging generics on USE

When we use-associate the same generic name from two different modules
they are merged together. If the same specific procedure occurs in both
generics it should only occur once in the merged one.

Similarly, it's not an error if they both have a derived type or
specific procedure named the same as the generic, as long as they are
the same symbol.

Fixes flang-compiler/f18#733.

Original-commit: flang-compiler/f18@d37db076914ea40aece502b13b9059dc4c1b319b
Reviewed-on: https://github.com/flang-compiler/f18/pull/741
Tree-same-pre-rewrite: false
flang/lib/semantics/symbol.cc
flang/test/semantics/resolve17.f90