aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-sra.c
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@physics.uc.edu>2004-11-22 20:02:16 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2004-11-22 12:02:16 -0800
commit478e2092877b02cd8d859e2ce5d623fc475c9e61 (patch)
tree642eb34e30add87caa49f6d47fff8912cc3c12bc /gcc/tree-sra.c
parent65c844e23ddf871ff0045edc74380feb54c3cf11 (diff)
downloadgcc-478e2092877b02cd8d859e2ce5d623fc475c9e61.zip
gcc-478e2092877b02cd8d859e2ce5d623fc475c9e61.tar.gz
gcc-478e2092877b02cd8d859e2ce5d623fc475c9e61.tar.bz2
re PR tree-optimization/18572 (Bus error compiling makegpr.adb on Mac OS X 10.3)
2004-11-22 Andrew Pinski <pinskia@physics.uc.edu> PR tree-opt/18572 * tree-sra.c (scalarize_init): Unshare the rhs before gimplifying it. From-SVN: r91024
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r--gcc/tree-sra.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 26ecf2e..3cc9261 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -1832,6 +1832,8 @@ scalarize_init (struct sra_elt *lhs_elt, tree rhs, block_stmt_iterator *bsi)
/* 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);
push_gimplify_context ();
result = generate_element_init (lhs_elt, rhs, &list);
pop_gimplify_context (NULL);