Commit d6d22108 by Jeff Law

c-typeck.c (initializer_constant_valid_p): Don't dereference a null pointer on…

c-typeck.c (initializer_constant_valid_p): Don't dereference a null pointer on partial structure initialization.

        * c-typeck.c (initializer_constant_valid_p): Don't dereference
        a null pointer on partial structure initialization.

From-SVN: r11333
parent 3297d3fd
......@@ -4279,7 +4279,8 @@ initializer_constant_valid_p (value, endtype)
case CONSTRUCTOR:
if ((TREE_CODE (TREE_TYPE (value)) == UNION_TYPE
|| TREE_CODE (TREE_TYPE (value)) == RECORD_TYPE)
&& TREE_CONSTANT (value))
&& TREE_CONSTANT (value)
&& CONSTRUCTOR_ELTS (value))
return
initializer_constant_valid_p (TREE_VALUE (CONSTRUCTOR_ELTS (value)),
endtype);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment