From: Jason Merrill Date: Mon, 13 Jan 2003 09:16:21 +0000 (-0500) Subject: re PR c++/8748 (ICE in cp_expr_size at cp/cp-lang.c: 307) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c226b8033919d72734ce96b67cbfebef2879e67b;p=gcc.git 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 --- diff --git a/gcc/testsuite/g++.dg/init/save1.C b/gcc/testsuite/g++.dg/init/save1.C new file mode 100644 index 00000000000..2358eb50c9d --- /dev/null +++ b/gcc/testsuite/g++.dg/init/save1.C @@ -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; }