[gcc/devel/rust/master] Fix canonical path parent resolution
Thomas Schwinge
tschwinge@gcc.gnu.org
Wed Mar 26 14:18:11 GMT 2025
https://gcc.gnu.org/g:d4a6f6086605826f9e9f632f3b48815e2fafd1d7
commit d4a6f6086605826f9e9f632f3b48815e2fafd1d7
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date: Tue Mar 11 14:33:05 2025 +0100
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 <pierre-emmanuel.patry@embecosm.com>
Diff:
---
gcc/rust/resolve/rust-forever-stack.hxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/rust/resolve/rust-forever-stack.hxx b/gcc/rust/resolve/rust-forever-stack.hxx
index c52cb7d5e8ac..87e0f9c48126 100644
--- a/gcc/rust/resolve/rust-forever-stack.hxx
+++ b/gcc/rust/resolve/rust-forever-stack.hxx
@@ -686,7 +686,7 @@ ForeverStack<N>::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;
More information about the Gcc-cvs
mailing list