[flang-commits] [PATCH] D156341: [flang] Cope with homonymous generic/specific in generic resolution
Peter Klausler via Phabricator via flang-commits
flang-commits at lists.llvm.org
Wed Jul 26 09:01:32 PDT 2023
klausler created this revision.
klausler added a reviewer: vdonaldson.
klausler added a project: Flang.
Herald added subscribers: sunshaoce, jdoerfert.
Herald added a project: All.
klausler requested review of this revision.
When a generic interface X has a specific procedure Y that is also a specific
procedure of another generic with the same name (Y), ensure that
generic resolution of a call to X that resolves to Y points to the
symbol of the specific procedure Y, not the generic.
https://reviews.llvm.org/D156341
Files:
flang/lib/Semantics/expression.cpp
Index: flang/lib/Semantics/expression.cpp
===================================================================
--- flang/lib/Semantics/expression.cpp
+++ flang/lib/Semantics/expression.cpp
@@ -2434,7 +2434,8 @@
}
}
if (const auto *details{ultimate.detailsIf<semantics::GenericDetails>()}) {
- for (const Symbol &specific : details->specificProcs()) {
+ for (const Symbol &specific0 : details->specificProcs()) {
+ const Symbol &specific{BypassGeneric(specific0)};
if (isSubroutine != !IsFunction(specific)) {
continue;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156341.544390.patch
Type: text/x-patch
Size: 565 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20230726/4e0ce1e5/attachment.bin>
More information about the flang-commits
mailing list