diff options
author | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-11-22 20:02:16 +0000 |
---|---|---|
committer | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-11-22 20:02:16 +0000 |
commit | 54a9357d2c16e45b3c6738310aee18edabae0710 (patch) | |
tree | 642eb34e30add87caa49f6d47fff8912cc3c12bc /gcc/tree-sra.c | |
parent | e1b9bbecdae7be65215d2010df4f9ee1d38d4bc2 (diff) | |
download | gcc-54a9357d2c16e45b3c6738310aee18edabae0710.tar.gz |
2004-11-22 Andrew Pinski <pinskia@physics.uc.edu>
PR tree-opt/18572
* tree-sra.c (scalarize_init): Unshare the rhs before gimplifying
it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91024 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r-- | gcc/tree-sra.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index 26ecf2e3401..3cc9261552c 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); |