This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Typo in ipa-devirt.c
- From: Marek Polacek <polacek at redhat dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 27 Jul 2015 21:35:35 +0200
- Subject: [committed] Typo in ipa-devirt.c
- Authentication-results: sourceware.org; auth=none
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.
2015-07-27 Marek Polacek <polacek@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