* semantics.c (finish_compound_literal): Set TREE_HAS_CONSTRUCTOR.
authorJason Merrill <jason@redhat.com>
Fri, 10 Jun 2011 03:55:33 +0000 (23:55 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 10 Jun 2011 03:55:33 +0000 (23:55 -0400)
From-SVN: r174881

gcc/cp/ChangeLog
gcc/cp/semantics.c

index df665d1f57f7a0e800b455aa23f0ed0c89a26859..c2ce6e02fbed32928c08dca87a61994ee641a52f 100644 (file)
@@ -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
index 53e599305baa8d1be3431aecc92a730dd5452139..bf6486be644470193724793dcb3f5cfcf6d1e177 100644 (file)
@@ -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))