summaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 607743b73f0..e00024156f7 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -3610,7 +3610,9 @@ gimplify_init_constructor (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
else
align = TYPE_ALIGN (type);
- if (size > 0 && !can_move_by_pieces (size, align))
+ if (size > 0
+ && num_nonzero_elements > 1
+ && !can_move_by_pieces (size, align))
{
tree new_tree;