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]

Re: [PATCH] Fix thinko in handle_alias_pairs (PR c/61271)


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


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