From: Pierre-Emmanuel Patry Date: Tue, 11 Mar 2025 13:33:05 +0000 (+0100) Subject: gccrs: Fix canonical path parent resolution X-Git-Tag: basepoints/gcc-16~700 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05c3b5171462b8b6b6652c31eda12ac578c2e6e0;p=thirdparty%2Fgcc.git gccrs: Fix canonical path parent resolution The algorithm was comparing using the wrong id, this lead to some mangling errors as an erroneous parent was selected. gcc/rust/ChangeLog: * resolve/rust-forever-stack.hxx: Fix the id comparison. Signed-off-by: Pierre-Emmanuel Patry --- diff --git a/gcc/rust/resolve/rust-forever-stack.hxx b/gcc/rust/resolve/rust-forever-stack.hxx index 59142a4094c..90e0ceb9f81 100644 --- a/gcc/rust/resolve/rust-forever-stack.hxx +++ b/gcc/rust/resolve/rust-forever-stack.hxx @@ -686,7 +686,7 @@ ForeverStack::to_canonical_path (NodeId id) const auto &link = kv.first; auto &child = kv.second; - if (link.id == child.id) + if (current.id == child.id) { outer_link = &link; break;