From: Jason Merrill Date: Tue, 14 Oct 2003 20:47:07 +0000 (-0400) Subject: re PR c++/11878 (ICE in cp_expr_size) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=52cdd56c655eaae8c91201e3563564b7dd1d0d35;p=gcc.git re PR c++/11878 (ICE in cp_expr_size) PR c++/11878 * tree.c (build_target_expr_with_type): Call force_rvalue for classes with non-trivial copy ctors. From-SVN: r72496 --- diff --git a/gcc/testsuite/g++.dg/init/copy6.C b/gcc/testsuite/g++.dg/init/copy6.C new file mode 100644 index 00000000000..136dc783026 --- /dev/null +++ b/gcc/testsuite/g++.dg/init/copy6.C @@ -0,0 +1,13 @@ +// PR c++/11878 + +struct A +{ + virtual ~A(); +}; + +template struct B +{ + T t; +}; + +void foo() { throw B().t; }