https://gcc.gnu.org/g:7495787e31c4e5ee6a04c8f05d227a4f0eb7a345

commit r13-9612-g7495787e31c4e5ee6a04c8f05d227a4f0eb7a345
Author: Martin Jambor <mjam...@suse.cz>
Date:   Tue Mar 11 14:52:44 2025 +0100

    Fix a pasto in ao_compare::compare_ao_refs
    
    When reading the function ao_compare::compare_ao_refs I came accross
    what I believe to ba a copy-and-paste error which this patch fixes.
    
    gcc/ChangeLog:
    
    2025-03-10  Martin Jambor  <mjam...@suse.cz>
    
            * tree-ssa-alias.cc (ao_compare::compare_ao_refs): Fix a
            copy-and-paste error.
    
    (cherry picked from commit dc47161c1f32c3f27d1157ba0de9d98ea1b7fc82)

Diff:
---
 gcc/tree-ssa-alias.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/tree-ssa-alias.cc b/gcc/tree-ssa-alias.cc
index dcb65648ec04..a784aebd6537 100644
--- a/gcc/tree-ssa-alias.cc
+++ b/gcc/tree-ssa-alias.cc
@@ -4292,12 +4292,13 @@ ao_compare::compare_ao_refs (ao_ref *ref1, ao_ref *ref2,
        c1 = p1, nskipped1 = i;
       i++;
     }
+  i = 0;
   for (tree p2 = ref2->ref; handled_component_p (p2); p2 = TREE_OPERAND (p2, 
0))
     {
       if (component_ref_to_zero_sized_trailing_array_p (p2))
        end_struct_ref2 = p2;
       if (ends_tbaa_access_path_p (p2))
-       c2 = p2, nskipped1 = i;
+       c2 = p2, nskipped2 = i;
       i++;
     }

Reply via email to