aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2025-03-11 14:33:05 +0100
committerP-E-P <32375388+P-E-P@users.noreply.github.com>2025-03-17 10:42:53 +0000
commitd4a6f6086605826f9e9f632f3b48815e2fafd1d7 (patch)
tree2c0b2cd5f307e9b9ead1fb8537dccdfc9f483903 /gcc
parent2c744b13326636a196dd2d7febe3928900078a9d (diff)
downloadgcc-d4a6f6086605826f9e9f632f3b48815e2fafd1d7.zip
gcc-d4a6f6086605826f9e9f632f3b48815e2fafd1d7.tar.gz
gcc-d4a6f6086605826f9e9f632f3b48815e2fafd1d7.tar.bz2
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>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/resolve/rust-forever-stack.hxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rust/resolve/rust-forever-stack.hxx b/gcc/rust/resolve/rust-forever-stack.hxx
index c52cb7d..87e0f9c 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;