re PR lto/78407 (LTO breaks separate overriding of symbol aliases)
authorJan Hubicka <hubicka@ucw.cz>
Thu, 19 Jan 2017 10:00:56 +0000 (11:00 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 19 Jan 2017 10:00:56 +0000 (10:00 +0000)
PR lto/78407
* symtab.c (symtab_node::equal_address_to): Fix comparing of
interposable aliases.

From-SVN: r244612

gcc/ChangeLog
gcc/symtab.c

index 5d4d73463ca4f0d90677339a2fe752d411449a2e..f9537916562e399e0d7fc7769a8770f10d00e6bb 100644 (file)
@@ -1,3 +1,9 @@
+2017-01-17  Jan Hubicka  <hubicka@ucw.cz>
+
+       PR lto/78407
+       * symtab.c (symtab_node::equal_address_to): Fix comparing of
+       interposable aliases.
+
 2017-01-18  Peter Bergner  <bergner@vnet.ibm.com>
 
        PR target/78516
index 87120970d34da49d52949627287d674673b0183b..ba395cdd26b40c2337e571ea0518ae4b624ecdd6 100644 (file)
@@ -1989,13 +1989,12 @@ symtab_node::equal_address_to (symtab_node *s2, bool memory_accessed)
   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;
     }