commit f978e83eff0078e22bb702596286c708b5eb5e03
Author: Jason Merrill <jason@redhat.com>
Date: Fri Aug 6 20:09:38 2010 +0200
* varasm.c (constructor_static_from_elts_p): Don't require a
CONSTRUCTOR to have elements to be suitable for static
initialization. Allow ARRAY_TYPE as well.
@@ -3893,8 +3893,8 @@ constructor_static_from_elts_p (const_tree ctor)
{
return (TREE_CONSTANT (ctor)
&& (TREE_CODE (TREE_TYPE (ctor)) == UNION_TYPE
- || TREE_CODE (TREE_TYPE (ctor)) == RECORD_TYPE)
- && !VEC_empty (constructor_elt, CONSTRUCTOR_ELTS (ctor)));
+ || TREE_CODE (TREE_TYPE (ctor)) == RECORD_TYPE
+ || TREE_CODE (TREE_TYPE (ctor)) == ARRAY_TYPE));
}
static tree initializer_constant_valid_p_1 (tree value, tree endtype,