This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix use of availability in ipa-icf
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 9 Oct 2015 11:33:49 +0200
- Subject: Re: Fix use of availability in ipa-icf
- Authentication-results: sourceware.org; auth=none
- References: <20151008232105 dot GE5527 at kam dot mff dot cuni dot cz>
On Fri, Oct 9, 2015 at 1:21 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
> 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.
Backport?
> 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");