On July 27, 2015 9:35:35 PM GMT+02:00, Marek Polacek <pola...@redhat.com> wrote:
>This patch fixes an obvious typo in types_same_for_odr detected by the
>new -Wtautological-compare warning.
>
>Bootstrapped/regtested on x86_64-linux, applying to trunk.

Might want to back port this.  Looks like a latent wrong-code bug to me.

Richard.

>2015-07-27  Marek Polacek  <pola...@redhat.com>
>
>       * ipa-devirt.c (types_same_for_odr): Fix typo.
>
>diff --git gcc/ipa-devirt.c gcc/ipa-devirt.c
>index b7afc3b..0a92768 100644
>--- gcc/ipa-devirt.c
>+++ gcc/ipa-devirt.c
>@@ -550,7 +550,7 @@ types_same_for_odr (const_tree type1, const_tree
>type2, bool strict)
>       return false;
>       if (TREE_CODE (type1) == RECORD_TYPE
>         && (TYPE_BINFO (type1) == NULL_TREE)
>-            != (TYPE_BINFO (type1) == NULL_TREE))
>+            != (TYPE_BINFO (type2) == NULL_TREE))
>       return false;
>       if (TREE_CODE (type1) == RECORD_TYPE && TYPE_BINFO (type1)
>         && (BINFO_VTABLE (TYPE_BINFO (type1)) == NULL_TREE)
>
>       Marek


Reply via email to