aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@physics.uc.edu>2005-04-25 18:08:35 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2005-04-25 11:08:35 -0700
commit0453e74da8230c0b02e42e82df2358331dfc8592 (patch)
tree3a6ecadd21ecc446183bce31fb0a8581319cd4ec /gcc/cp
parentcc7220fd0e78ebe5c963157b1272729540b62c9a (diff)
downloadgcc-0453e74da8230c0b02e42e82df2358331dfc8592.zip
gcc-0453e74da8230c0b02e42e82df2358331dfc8592.tar.gz
gcc-0453e74da8230c0b02e42e82df2358331dfc8592.tar.bz2
re PR c++/21188 (CbcModel.cpp:3571: internal compiler error: in compare_values, at tree-vrp.c:292)
2005-04-25 Andrew Pinski <pinskia@physics.uc.edu> PR C++/21188 * g++.dg/opt/rtti2.C: New test. 2005-04-25 Andrew Pinski <pinskia@physics.uc.edu> PR C++/21188 * rtti.c (ifnonnull): Cast the zero comparison operand to the correct type. From-SVN: r98726
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/rtti.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 07f7daa..74b00a1 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2005-04-25 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR C++/21188
+ * rtti.c (ifnonnull): Cast the zero comparison operand
+ to the correct type.
+
2005-04-24 Jakub Jelinek <jakub@redhat.com>
PR middle-end/20991
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c
index 1cad0bd..bff6c95 100644
--- a/gcc/cp/rtti.c
+++ b/gcc/cp/rtti.c
@@ -419,7 +419,8 @@ static tree
ifnonnull (tree test, tree result)
{
return build3 (COND_EXPR, TREE_TYPE (result),
- build2 (EQ_EXPR, boolean_type_node, test, integer_zero_node),
+ build2 (EQ_EXPR, boolean_type_node, test,
+ cp_convert (TREE_TYPE (test), integer_zero_node)),
cp_convert (TREE_TYPE (result), integer_zero_node),
result);
}