Commit 0453e74d by Andrew Pinski Committed by Andrew Pinski

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
parent cc7220fd
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
......
......@@ -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);
}
......
2005-04-25 Andrew Pinski <pinskia@physics.uc.edu>
PR C++/21188
* g++.dg/opt/rtti2.C: New test.
2005-04-25 Paul Brook <paul@codesourcery.com>
Steven G. Kargl <kargls@comcast.net>
......
// { dg-do compile }
// { dg-options "-O2" }
// We used to ICE in compare_values as the types for a comparison
// were not the same kind of types.
struct class1
{
virtual ~class1 ();
};
struct class2 : class1 { };
void f(class1 * oo)
{
class2 * oj = dynamic_cast <class2 *>(oo) ;
if (oj)
delete oo;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment