[all-commits] [llvm/llvm-project] cd2a8d: [flang] Don't prematurely resolve subprogram names
Peter Klausler via All-commits
all-commits at lists.llvm.org
Tue May 24 13:35:20 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: cd2a8df8916505de9df68b9a6c1700f71e5ebf44
https://github.com/llvm/llvm-project/commit/cd2a8df8916505de9df68b9a6c1700f71e5ebf44
Author: Peter Klausler <pklausler at nvidia.com>
Date: 2022-05-24 (Tue, 24 May 2022)
Changed paths:
M flang/lib/Semantics/resolve-names.cpp
Log Message:
-----------
[flang] Don't prematurely resolve subprogram names
Name resolution for subprograms checks whether the name is already
present in the enclosing scope as a generic interface, so that the
case of a generic with the same name as one of its specifics can be
handled. The particular means by which the enclosing scope is searched
for the name would resolve the name (bind a symbol to it) as a side
effect. This turns out to be the wrong thing to do when the subprogram
is going to have its symbol created in another scope to cope with its
BIND(C,NAME="name") name, and its Fortran name is already present in the
enclosing scope for a subprogram of the same name but without
BIND(C,NAME="name").
A very long explanation for a one-line fix, sorry. In short, change
the code to look up the name but not resolve it at that point.
Differential Revision: https://reviews.llvm.org/D126149
More information about the All-commits
mailing list