aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>2003-10-14 16:47:07 -0400
committerJason Merrill <jason@gcc.gnu.org>2003-10-14 16:47:07 -0400
commit52cdd56c655eaae8c91201e3563564b7dd1d0d35 (patch)
treea4d3b1d1c9f976533a07df5826af2b777256e879
parent5455db23afe7ba8c0fe203868ac6a62bafeb54a8 (diff)
downloadgcc-52cdd56c655eaae8c91201e3563564b7dd1d0d35.zip
gcc-52cdd56c655eaae8c91201e3563564b7dd1d0d35.tar.gz
gcc-52cdd56c655eaae8c91201e3563564b7dd1d0d35.tar.bz2
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
-rw-r--r--gcc/testsuite/g++.dg/init/copy6.C13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/init/copy6.C b/gcc/testsuite/g++.dg/init/copy6.C
new file mode 100644
index 0000000..136dc78
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/copy6.C
@@ -0,0 +1,13 @@
+// PR c++/11878
+
+struct A
+{
+ virtual ~A();
+};
+
+template<typename T> struct B
+{
+ T t;
+};
+
+void foo() { throw B<A>().t; }