tree-sra.c (scalarize_init): Insert the generate_element_init statements after the generate_element_zero...
gcc/ * tree-sra.c (scalarize_init): Insert the generate_element_init statements after the generate_element_zero statements. From-SVN: r131258
This commit is contained in:
parent
ee6ec6667c
commit
1463dfa49e
|
@ -1,3 +1,8 @@
|
|||
2008-01-02 Richard Sandiford <rsandifo@nildram.co.uk>
|
||||
|
||||
* tree-sra.c (scalarize_init): Insert the generate_element_init
|
||||
statements after the generate_element_zero statements.
|
||||
|
||||
2008-01-02 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/34093
|
||||
|
|
|
@ -3354,19 +3354,20 @@ static void
|
|||
scalarize_init (struct sra_elt *lhs_elt, tree rhs, block_stmt_iterator *bsi)
|
||||
{
|
||||
bool result = true;
|
||||
tree list = NULL;
|
||||
tree list = NULL, init_list = NULL;
|
||||
|
||||
/* Generate initialization statements for all members extant in the RHS. */
|
||||
if (rhs)
|
||||
{
|
||||
/* Unshare the expression just in case this is from a decl's initial. */
|
||||
rhs = unshare_expr (rhs);
|
||||
result = generate_element_init (lhs_elt, rhs, &list);
|
||||
result = generate_element_init (lhs_elt, rhs, &init_list);
|
||||
}
|
||||
|
||||
/* CONSTRUCTOR is defined such that any member not mentioned is assigned
|
||||
a zero value. Initialize the rest of the instantiated elements. */
|
||||
generate_element_zero (lhs_elt, &list);
|
||||
append_to_statement_list (init_list, &list);
|
||||
|
||||
if (!result)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue