summaryrefslogtreecommitdiff
path: root/gcc/cp/method.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-08 08:32:26 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-08 08:32:26 +0000
commitfe9522ceedb6e0ef47da4ac0d364151ad5020b0a (patch)
tree808a0ca6b00e83bccc17095bf03842c6f8042886 /gcc/cp/method.c
parent8b3fa39e88cb353a5725a4c4d4de5f8a655b1ac1 (diff)
downloadgcc-fe9522ceedb6e0ef47da4ac0d364151ad5020b0a.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106634 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/method.c')
-rw-r--r--gcc/cp/method.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index d68423ce8fe..67e42ea1e0e 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -502,7 +502,8 @@ use_thunk (tree thunk_fndecl, bool emit_p)
t = build3 (COND_EXPR, TREE_TYPE (t), cond, t,
cp_convert (TREE_TYPE (t), integer_zero_node));
}
- t = force_target_expr (TREE_TYPE (t), t);
+ if (IS_AGGR_TYPE (TREE_TYPE (t)))
+ t = build_cplus_new (TREE_TYPE (t), t);
finish_return_stmt (t);
}