aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2011-06-09 23:55:33 -0400
committerJason Merrill <jason@gcc.gnu.org>2011-06-09 23:55:33 -0400
commit8c53f5e2fad1a0c4bccd894ab6e57a169fc66baf (patch)
treeab510e04a64f8ca07e9016ffe336181a49fbb4e2
parent3d223145a5c7716c3622b8dd4dadc826f1469ddc (diff)
downloadgcc-8c53f5e2fad1a0c4bccd894ab6e57a169fc66baf.zip
gcc-8c53f5e2fad1a0c4bccd894ab6e57a169fc66baf.tar.gz
gcc-8c53f5e2fad1a0c4bccd894ab6e57a169fc66baf.tar.bz2
* semantics.c (finish_compound_literal): Set TREE_HAS_CONSTRUCTOR.
From-SVN: r174881
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/semantics.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index df665d1..c2ce6e0 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+2011-06-09 Jason Merrill <jason@redhat.com>
+
+ * semantics.c (finish_compound_literal): Set TREE_HAS_CONSTRUCTOR.
+
2011-06-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/29003
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 53e5993..bf6486b 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -2387,6 +2387,8 @@ finish_compound_literal (tree type, tree compound_literal,
return error_mark_node;
}
compound_literal = digest_init (type, compound_literal, complain);
+ if (TREE_CODE (compound_literal) == CONSTRUCTOR)
+ TREE_HAS_CONSTRUCTOR (compound_literal) = true;
/* Put static/constant array temporaries in static variables, but always
represent class temporaries with TARGET_EXPR so we elide copies. */
if ((!at_function_scope_p () || CP_TYPE_CONST_P (type))