commit 499bc6705442c7842bb3b2e338930ff615a39b38 Author: Jason Merrill Date: Thu Jun 9 00:56:22 2011 -0400 * semantics.c (finish_compound_literal): Set TREE_HAS_CONSTRUCTOR. 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))