mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-23 18:11:15 +08:00
re PR c++/18968 (ICE: tree check: expected ssa_name, have addr_expr in vrp_hash)
2004-12-13 Andrew Pinski <pinskia@physics.uc.edu> PR c++/18968 * g++.dg/opt/pr18968.C: New test. 2004-12-13 Andrew Pinski <pinskia@physics.uc.edu> PR c++/18968 * class.c (build_base_path): Convert the zero constant to the correct type when comparing. From-SVN: r92121
This commit is contained in:
parent
532b37d9b8
commit
471a58a941
@ -1,3 +1,9 @@
|
||||
2004-12-13 Andrew Pinski <pinskia@physics.uc.edu>
|
||||
|
||||
PR c++/18968
|
||||
* class.c (build_base_path): Convert the zero constant to the correct
|
||||
type when comparing.
|
||||
|
||||
2004-12-13 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/18925
|
||||
|
@ -295,8 +295,11 @@ build_base_path (enum tree_code code,
|
||||
|
||||
/* Now that we've saved expr, build the real null test. */
|
||||
if (null_test)
|
||||
null_test = fold (build2 (NE_EXPR, boolean_type_node,
|
||||
expr, integer_zero_node));
|
||||
{
|
||||
tree zero = cp_convert (TREE_TYPE (expr), integer_zero_node);
|
||||
null_test = fold (build2 (NE_EXPR, boolean_type_node,
|
||||
expr, zero));
|
||||
}
|
||||
|
||||
/* If this is a simple base reference, express it as a COMPONENT_REF. */
|
||||
if (code == PLUS_EXPR && !virtual_access
|
||||
|
@ -1,3 +1,8 @@
|
||||
2004-12-13 Andrew Pinski <pinskia@physics.uc.edu>
|
||||
|
||||
PR c++/18968
|
||||
* g++.dg/opt/pr18968.C: New test.
|
||||
|
||||
2004-12-13 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/18925
|
||||
|
18
gcc/testsuite/g++.dg/opt/pr18968.C
Normal file
18
gcc/testsuite/g++.dg/opt/pr18968.C
Normal file
@ -0,0 +1,18 @@
|
||||
// { dg-do compile }
|
||||
// { dg-options "-O1" }
|
||||
struct X
|
||||
{
|
||||
int i;
|
||||
};
|
||||
struct Y : virtual X {};
|
||||
struct Z : Y {};
|
||||
struct A
|
||||
{
|
||||
Z* p;
|
||||
A();
|
||||
};
|
||||
A::A() : p(0)
|
||||
{
|
||||
((X*)(Y*)p)->i++;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user