[flang] Fix USE rename
authorLeandro Lupori <leandro.lupori@linaro.org>
Fri, 10 Feb 2023 20:50:45 +0000 (20:50 +0000)
committerLeandro Lupori <leandro.lupori@linaro.org>
Tue, 14 Feb 2023 13:04:56 +0000 (10:04 -0300)
commit1fae1464d7a78e7184f2b40f25e9491c87d93693
treec899c6a2378ff9b478be33185917248dc7462817
parent67223522355b5d75ef4efc2889722239c44fc255
[flang] Fix USE rename

Fix USE rename when use-name and local-name are the same.
Previously, the associated symbol was being removed from scope.

Operator rename implementation needed no change, because, as it
doesn't call AddUseRename(), symbol erasure is skipped.

Fixes #60223

Reviewed By: klausler

Differential Revision: https://reviews.llvm.org/D143933
flang/lib/Semantics/resolve-names.cpp
flang/test/Semantics/resolve116.f90 [new file with mode: 0644]