diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f51730a1f4b4..6c3518911b34 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2008-12-11 Jakub Jelinek + + PR c++/38253 + * gimplify.c (gimplify_init_constructor): Don't force constructor + into memory if there is just one nonzero element. + 2008-12-11 Sebastian Pop Fix testsuite/gfortran.dg/graphite/id-4.f90. diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 607743b73f0e..e00024156f75 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;