From: Jason Merrill Date: Fri, 10 Jun 2011 03:55:33 +0000 (-0400) Subject: * semantics.c (finish_compound_literal): Set TREE_HAS_CONSTRUCTOR. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8c53f5e2fad1a0c4bccd894ab6e57a169fc66baf;p=gcc.git * semantics.c (finish_compound_literal): Set TREE_HAS_CONSTRUCTOR. From-SVN: r174881 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index df665d1f57f..c2ce6e02fbe 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2011-06-09 Jason Merrill + + * semantics.c (finish_compound_literal): Set TREE_HAS_CONSTRUCTOR. + 2011-06-09 Paolo Carlini PR c++/29003 diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 53e599305ba..bf6486be644 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))