[flang] Fix bug in IMPLICIT NONE(EXTERNAL)
authorTim Keith <tkeith@nvidia.com>
Sat, 19 Dec 2020 01:43:51 +0000 (17:43 -0800)
committerTim Keith <tkeith@nvidia.com>
Sat, 19 Dec 2020 01:43:53 +0000 (17:43 -0800)
commitbf0870d8640df27b6bb082de0347008240cb0e67
tree06af057904fa76ed9b1aaf5b07e0f0e206b5bc22
parent44f399ccc12e27d20bae1ea7e712ef7f71e2ff3a
[flang] Fix bug in IMPLICIT NONE(EXTERNAL)

We were only checking the restrictions of IMPLICIT NONE(EXTERNAL) when a
procedure name is first encountered. But it can also happen with an
existing symbol, e.g. if an external function's return type is declared
before is it called. This change adds a check in that branch too.

Differential Revision: https://reviews.llvm.org/D93552
flang/lib/Semantics/resolve-names.cpp
flang/test/Semantics/implicit07.f90