[flang] Map symbols in expressions when copying interface symbols
authorPeter Klausler <pklausler@nvidia.com>
Fri, 2 Dec 2022 15:19:49 +0000 (07:19 -0800)
committerPeter Klausler <pklausler@nvidia.com>
Mon, 5 Dec 2022 15:33:57 +0000 (07:33 -0800)
commit9e855a6cb84a7c1f9f027474e9b881206df925e3
tree18e67f74a989608875b8726882ac76454032e0d6
parent6e08ac8dce919c7497876d36a04a05ffc52d0e93
[flang] Map symbols in expressions when copying interface symbols

Given a MODULE SUBROUTINE or MODULE FUNCTION interface followed
later by a corresponding separate module subprogram definition in a
MODULE PROCEDURE, the copies of the interface's dummy argument and
function result symbols that populate the initial scope of that
MODULE PROCEDURE need to have any symbol references in their types
or bounds adjusted to point to their new counterparts.

Differential Revision: https://reviews.llvm.org/D139200
15 files changed:
flang/include/flang/Evaluate/call.h
flang/include/flang/Evaluate/traverse.h
flang/include/flang/Evaluate/variable.h
flang/include/flang/Semantics/symbol.h
flang/include/flang/Semantics/type.h
flang/lib/Evaluate/call.cpp
flang/lib/Evaluate/variable.cpp
flang/lib/Semantics/mod-file.cpp
flang/lib/Semantics/resolve-names-utils.cpp
flang/lib/Semantics/resolve-names-utils.h
flang/lib/Semantics/resolve-names.cpp
flang/lib/Semantics/runtime-type-info.cpp
flang/lib/Semantics/symbol.cpp
flang/lib/Semantics/type.cpp
flang/test/Semantics/modproc01.f90 [new file with mode: 0644]