commit d643f3c28260e0295e6ac3dd0b4d80e26b00ea3f
Author: Jason Merrill <jason@redhat.com>
Date: Tue Oct 22 16:33:38 2013 -0400
* semantics.c (finish_compound_literal): Don't create a static variable
inside cp_unevaluated_operand.
@@ -2501,6 +2501,7 @@ finish_compound_literal (tree type, tree compound_literal,
if ((!at_function_scope_p () || CP_TYPE_CONST_P (type))
&& TREE_CODE (type) == ARRAY_TYPE
&& !TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type)
+ && !cp_unevaluated_operand
&& initializer_constant_valid_p (compound_literal, type))
{
tree decl = create_temporary_var (type);