Hi,
this patch fixes false positive of symtab_node::equal_address_to when
comparing non-interposable alias with interposable definition.

Honza

Index: ChangeLog
===================================================================
--- ChangeLog   (revision 244611)
+++ ChangeLog   (working copy)
@@ -1,3 +1,9 @@
+2017-01-17  Jan Hubicka  <hubi...@ucw.cz>
+
+       PR lto/78407
+       * symtab.c (symtab_node::equal_address_to): Fix comparing of
+       interposable aliases.
+
 2017-01-18  Peter Bergner  <berg...@vnet.ibm.com>
 
        PR target/78516
Index: symtab.c
===================================================================
--- symtab.c    (revision 244611)
+++ symtab.c    (working copy)
@@ -1989,13 +1989,12 @@ symtab_node::equal_address_to (symtab_no
   if (rs1 != rs2 && avail1 >= AVAIL_AVAILABLE && avail2 >= AVAIL_AVAILABLE)
     binds_local1 = binds_local2 = true;
 
-  if ((binds_local1 ? rs1 : this)
-       == (binds_local2 ? rs2 : s2))
+  if (binds_local1 && binds_local2 && rs1 == rs2)
     {
       /* We made use of the fact that alias is not weak.  */
-      if (binds_local1 && rs1 != this)
+      if (rs1 != this)
         refuse_visibility_changes = true;
-      if (binds_local2 && rs2 != s2)
+      if (rs2 != s2)
         s2->refuse_visibility_changes = true;
       return 1;
     }

Reply via email to