varasm.c (constructor_static_from_elts_p): Don't require a CONSTRUCTOR to have elements to be suitable for static...
* 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. From-SVN: r165975
This commit is contained in:
parent
701c0df13e
commit
73c982bc87
@ -1,3 +1,9 @@
|
||||
2010-10-26 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2010-10-26 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
PR middle-end/45736
|
||||
|
@ -3901,8 +3901,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,
|
||||
|
Loading…
Reference in New Issue
Block a user