From 8c53f5e2fad1a0c4bccd894ab6e57a169fc66baf Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Thu, 9 Jun 2011 23:55:33 -0400 Subject: [PATCH] * semantics.c (finish_compound_literal): Set TREE_HAS_CONSTRUCTOR. From-SVN: r174881 --- gcc/cp/ChangeLog | 4 ++++ gcc/cp/semantics.c | 2 ++ 2 files changed, 6 insertions(+) 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)) -- 2.30.2