[flang] Handle subprogram declaration after call
authorTim Keith <tkeith@nvidia.com>
Fri, 22 Feb 2019 19:38:43 +0000 (11:38 -0800)
committerGitHub <noreply@github.com>
Thu, 28 Feb 2019 18:38:17 +0000 (10:38 -0800)
commitf1bcb921807248edca18831a4d8204a1479733c3
tree7ad2927017ddf2778a420dd64faedc3a4298a148
parent41e5053ee6efcb3a7a6ddb3d8858084c94a0aa1b
[flang] Handle subprogram declaration after call

If an external subprogram is called and then declared, we have to
replace the `ProcEntityDetails` with `SubprogramDetails` in the symbol.
While doing so we can also check that the call was consistent with the
declaration for function vs. subprogram.

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