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]

[committed] Typo in ipa-devirt.c


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


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