Hi,
this is a bug I noticed while reading the code.  We can not assume interposable
objects to be equivalent unless they are actually the same symbols.

Bootstrapped/regtested x86_64-linux, comitted.

Honza

        * ipa-icf.c (sem_item::compare_symbol_references): Fix use
        of availability.
Index: ipa-icf.c
===================================================================
--- ipa-icf.c   (revision 228625)
+++ ipa-icf.c   (working copy)
@@ -521,8 +521,8 @@ sem_item::compare_symbol_references (
   n1 = n1->ultimate_alias_target (&avail1);
   n2 = n2->ultimate_alias_target (&avail2);
 
-  if (avail1 >= AVAIL_INTERPOSABLE && ignored_nodes.get (n1)
-      && avail2 >= AVAIL_INTERPOSABLE && ignored_nodes.get (n2))
+  if (avail1 > AVAIL_INTERPOSABLE && ignored_nodes.get (n1)
+      && avail2 > AVAIL_INTERPOSABLE && ignored_nodes.get (n2))
     return true;
 
   return return_false_with_msg ("different references");

Reply via email to