diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-12-11 09:15:17 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-12-11 09:15:17 +0000 |
commit | e3a32435c506cdcb3b87571ba8216bde178caaae (patch) | |
tree | 442fa7aa91749326a650fa74d145b8438903c355 /gcc/gimplify.c | |
parent | 899e61260543fe05f5aad69a585cf28ba9b63883 (diff) | |
download | gcc-e3a32435c506cdcb3b87571ba8216bde178caaae.tar.gz |
PR c++/38253
* gimplify.c (gimplify_init_constructor): Don't force constructor
into memory if there is just one nonzero element.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142674 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 4 |
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; |