summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-11 16:59:23 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-11 16:59:23 +0000
commit86669a0739a00da2ee218abda9d66a48010db120 (patch)
treee24114e538df43641414926a42dcddd442d0b0e9
parent4c163af5e77c2035147a1e60bc84e58b75971e3f (diff)
downloadgcc-86669a0739a00da2ee218abda9d66a48010db120.tar.gz
* gimplify.c (gimplify_init_constructor): Do not clear the object when
the constructor is incomplete and CONSTRUCTOR_NO_CLEARING is set. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204678 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/gimplify.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 2875a07c304..914766ad3b0 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -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
every field that needs to be set. */
cleared = false;
- else if (!complete_p)
+ else if (!complete_p && !CONSTRUCTOR_NO_CLEARING (ctor))
/* 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
in the initializer, we should simply set them to zero. Except