+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
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)
{