This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix use of availability in ipa-icf
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 9 Oct 2015 01:21:05 +0200
- Subject: Fix use of availability in ipa-icf
- Authentication-results: sourceware.org; auth=none
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");