aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2005-11-08 03:32:26 -0500
committerJason Merrill <jason@gcc.gnu.org>2005-11-08 03:32:26 -0500
commit831d8bd74194144ed86d9569a7b0d5447ba4452a (patch)
tree808a0ca6b00e83bccc17095bf03842c6f8042886 /gcc/testsuite
parentdfea1f6121293f7ddccc8a599ee4a70cf7a06ab7 (diff)
downloadgcc-831d8bd74194144ed86d9569a7b0d5447ba4452a.zip
gcc-831d8bd74194144ed86d9569a7b0d5447ba4452a.tar.gz
gcc-831d8bd74194144ed86d9569a7b0d5447ba4452a.tar.bz2
re PR c++/21123 (ICE in cp_expr_size, at cp/cp-objcp-common.c:101)
PR c++/21123 * cp/method.c (use_thunk): Use build_cplus_new instead of force_target_expr. * tree.h (CALL_FROM_THUNK_P): Add CALL_EXPR_CHECK. From-SVN: r106634
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/g++.dg/inherit/thunk4.C23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/inherit/thunk4.C b/gcc/testsuite/g++.dg/inherit/thunk4.C
new file mode 100644
index 0000000..a6e913e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/inherit/thunk4.C
@@ -0,0 +1,23 @@
+// PR c++/21123
+
+struct A
+{
+ A( const A &a);
+ const A& operator=( const A& a);
+};
+
+struct B
+{
+ virtual A f();
+};
+
+struct C : virtual B
+{
+ virtual A f();
+ A a;
+};
+
+A C::f()
+{
+ return a;
+}