This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix use of availability in ipa-icf


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");


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]