re PR c++/8748 (ICE in cp_expr_size at cp/cp-lang.c: 307)

PR c++/8748
        * class.c (build_base_path): Take the address before calling save_expr.

From-SVN: r61250
This commit is contained in:
Jason Merrill 2003-01-13 04:16:21 -05:00
parent 970684896d
commit c226b80339
1 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,20 @@
// PR c++/8748
// We were wrapping the ARRAY_REF in a SAVE_EXPR, causing us to try to make a bitwise
// copy of b[0].
struct A
{
int i;
};
struct B : A
{
virtual ~B();
};
struct C
{
B b[1];
};
void foo() { C().b[0].i; }