gimplify.c (gimplify_init_constructor): Do not clear the object when the constructor is incomplete and...

* gimplify.c (gimplify_init_constructor): Do not clear the object when
	the constructor is incomplete and CONSTRUCTOR_NO_CLEARING is set.

From-SVN: r204678
This commit is contained in:
Eric Botcazou 2013-11-11 16:59:23 +00:00
parent 1448093c32
commit d368135f69
1 changed files with 2 additions and 2 deletions

View File

@ -4052,9 +4052,9 @@ gimplify_init_constructor (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
objects. Initializers for such objects must explicitly set objects. Initializers for such objects must explicitly set
every field that needs to be set. */ every field that needs to be set. */
cleared = false; cleared = false;
else if (!complete_p) else if (!complete_p && !CONSTRUCTOR_NO_CLEARING (ctor))
/* If the constructor isn't complete, clear the whole object /* If the constructor isn't complete, clear the whole object
beforehand. beforehand, unless CONSTRUCTOR_NO_CLEARING is set on it.
??? This ought not to be needed. For any element not present ??? This ought not to be needed. For any element not present
in the initializer, we should simply set them to zero. Except in the initializer, we should simply set them to zero. Except