From db7a1a609f6cb860b12fdff9145d59a5a040eab6 Mon Sep 17 00:00:00 2001 From: dalej Date: Mon, 22 Aug 2005 20:58:08 +0000 Subject: [PATCH] 2005-08-22 Dale Johannesen Radar 4216812 * tree-sra.c (scalarize_init): Add integer_copy handling. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/apple-200508-beta-branch@103357 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog.apple-ppc | 5 +++++ gcc/tree-sra.c | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog.apple-ppc b/gcc/ChangeLog.apple-ppc index 290e7482c79..f4dee607cc7 100644 --- a/gcc/ChangeLog.apple-ppc +++ b/gcc/ChangeLog.apple-ppc @@ -1,3 +1,8 @@ +2005-08-22 Dale Johannesen + + Radar 4216812 + * tree-sra.c (scalarize_init): Add integer_copy handling. + 2005-08-09 Stuart Hastings Radar 4209014 diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index 39610e35140..d1fb4bdbecc 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -1438,7 +1438,7 @@ decide_block_copy (struct sra_elt *elt) need to do a block copy or an element copy but we can use V_C_E and create an integer variable which has the same mode as the struct and this is only a copy. - Copies bigger than DImode create problems later, so disallow them. */ + Copies bigger than DImode create problems later, so disallow them. */ if (!elt->is_scalar && TYPE_MODE (elt->type) != BLKmode && elt->n_uses == 0 && elt->children == NULL && full_size <= GET_MODE_SIZE (DImode)) @@ -2037,9 +2037,12 @@ scalarize_init (struct sra_elt *lhs_elt, tree rhs, block_stmt_iterator *bsi) /* 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); + /* APPLE LOCAL begin 4216812 */ + if (lhs_elt->how_to_copy != integer_copy) + generate_element_zero (lhs_elt, &list); - if (!result) + if (!result || lhs_elt->how_to_copy == integer_copy) + /* APPLE LOCAL end 4216812 */ { /* If we failed to convert the entire initializer, then we must leave the structure assignment in place and must load values -- 2.11.4.GIT