(digest_init): Test TREE_TYPE (inside_init) is
nonzero before testing anything else about it. From-SVN: r1879
This commit is contained in:
parent
68a8ca25ec
commit
2726966da1
@ -4603,12 +4603,12 @@ digest_init (type, init, tail, require_constant, constructor_constant, ofwhat)
|
||||
from an expression of the same type, optionally with braces.
|
||||
For an array, this is allowed only for a string constant. */
|
||||
|
||||
if (inside_init
|
||||
&& (TYPE_MAIN_VARIANT (TREE_TYPE (inside_init)) == TYPE_MAIN_VARIANT (type)
|
||||
|| (code == ARRAY_TYPE && TREE_TYPE (inside_init)
|
||||
if (inside_init && TREE_TYPE (inside_init) != 0
|
||||
&& ((TYPE_MAIN_VARIANT (TREE_TYPE (inside_init))
|
||||
== TYPE_MAIN_VARIANT (type)))
|
||||
|| (code == ARRAY_TYPE
|
||||
&& comptypes (TREE_TYPE (inside_init), type))
|
||||
|| (code == POINTER_TYPE
|
||||
&& TREE_TYPE (inside_init) != 0
|
||||
&& (TREE_CODE (TREE_TYPE (inside_init)) == ARRAY_TYPE
|
||||
|| TREE_CODE (TREE_TYPE (inside_init)) == FUNCTION_TYPE)
|
||||
&& comptypes (TREE_TYPE (TREE_TYPE (inside_init)),
|
||||
|
Loading…
Reference in New Issue
Block a user