]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Fix canonical path parent resolution
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Tue, 11 Mar 2025 13:33:05 +0000 (14:33 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Mon, 24 Mar 2025 12:07:26 +0000 (13:07 +0100)
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>
gcc/rust/resolve/rust-forever-stack.hxx

index 59142a4094cdce18deb0b39219237de4e37b1a4a..90e0ceb9f811b192b236fc4c9872309a947253dd 100644 (file)
@@ -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;