This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix thinko in handle_alias_pairs (PR c/61271)
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Marek Polacek <polacek at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <hubicka at ucw dot cz>
- Date: Tue, 19 Aug 2014 13:22:20 +0200
- Subject: Re: [PATCH] Fix thinko in handle_alias_pairs (PR c/61271)
- Authentication-results: sourceware.org; auth=none
- References: <20140819102548 dot GG11974 at redhat dot com>
On Tue, Aug 19, 2014 at 12:25 PM, Marek Polacek <polacek@redhat.com> wrote:
> handle_alias_pairs contains the following thinko.
> I believe it should be "not a virtual function".
>
> Bootstrapped/regtested on x86_64-linux, ok for trunk?
Ok. Is only trunk affected?
Thanks,
Richard.
> 2014-08-19 Marek Polacek <polacek@redhat.com>
>
> PR c/61271
> * cgraphunit.c (handle_alias_pairs): Fix condition.
>
> diff --git gcc/cgraphunit.c gcc/cgraphunit.c
> index d9acc65..2c2006b 100644
> --- gcc/cgraphunit.c
> +++ gcc/cgraphunit.c
> @@ -1171,7 +1171,7 @@ handle_alias_pairs (void)
> /* We use local aliases for C++ thunks to force the tailcall
> to bind locally. This is a hack - to keep it working do
> the following (which is not strictly correct). */
> - && (! TREE_CODE (target_node->decl) == FUNCTION_DECL
> + && (TREE_CODE (target_node->decl) != FUNCTION_DECL
> || ! DECL_VIRTUAL_P (target_node->decl))
> && ! lookup_attribute ("weakref", DECL_ATTRIBUTES (p->decl)))
> {
>
> Marek