aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/tree.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2010-10-27 11:48:16 -0400
committerJason Merrill <jason@gcc.gnu.org>2010-10-27 11:48:16 -0400
commit236fd18cbaf1bde6093024b096627e7cdb488417 (patch)
treec8b266900b1171a5d24fc6cd5ae7c6e405f1838c /gcc/cp/tree.c
parente02927a11ac5a16f42193c198b300fda15230404 (diff)
downloadgcc-236fd18cbaf1bde6093024b096627e7cdb488417.zip
gcc-236fd18cbaf1bde6093024b096627e7cdb488417.tar.gz
gcc-236fd18cbaf1bde6093024b096627e7cdb488417.tar.bz2
* tree.c (build_cplus_new): Handle CONSTRUCTOR.
From-SVN: r166007
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r--gcc/cp/tree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 31f5845..511730a 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -441,7 +441,8 @@ build_cplus_new (tree type, tree init)
if (TREE_CODE (rval) == AGGR_INIT_EXPR)
slot = AGGR_INIT_EXPR_SLOT (rval);
- else if (TREE_CODE (rval) == CALL_EXPR)
+ else if (TREE_CODE (rval) == CALL_EXPR
+ || TREE_CODE (rval) == CONSTRUCTOR)
slot = build_local_temp (type);
else
return rval;