[flang] Allow module procedure and generic with same name
authorTim Keith <tkeith@nvidia.com>
Tue, 26 Feb 2019 21:28:53 +0000 (13:28 -0800)
committerGitHub <noreply@github.com>
Thu, 28 Feb 2019 18:38:17 +0000 (10:38 -0800)
commit0b9621b635d623c5c30fc67993b671d9afa5d076
tree51e52bbb154053c58aeb1474d05dbc9e313fde9a
parent563e65ded1613ba8bb3ec8735a966315ddc56835
[flang] Allow module procedure and generic with same name

The `GenericDetails::CheckSpecific()` check was happening too early.
We have to wait until all procedures of the generic have been seen.
The generic can have the same name as a module procedure only if that
module procedure is a specific procedure of the generic.

Improve the `SayAlreadyDeclared` error message when the previous
declaration is a use-association

Original-commit: flang-compiler/f18@269e3db6020a5acc51a291dfea98455e6a97d2d5
Reviewed-on: https://github.com/flang-compiler/f18/pull/305
Tree-same-pre-rewrite: false
flang/lib/semantics/resolve-names.cc
flang/test/semantics/resolve17.f90