aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
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
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')
-rw-r--r--gcc/cp/ChangeLog2
-rw-r--r--gcc/cp/tree.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 178bed6..d0ea05c 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,7 @@
2010-10-27 Jason Merrill <jason@redhat.com>
+ * tree.c (build_cplus_new): Handle CONSTRUCTOR.
+
* semantics.c (finish_compound_stmt): Avoid creating an
unnecessary BIND_EXPR.
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;