diff options
author | Richard Guenther <rguenther@suse.de> | 2012-01-27 15:50:32 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2012-01-27 15:50:32 +0000 |
commit | 136049275038111ec39775a11970db0fd2769f96 (patch) | |
tree | de0137219b2809a11282fc9afc61586b926e30df /gcc | |
parent | ace018f9388c01f3f430e7ab89d4c2e424e7663e (diff) | |
download | gcc-136049275038111ec39775a11970db0fd2769f96.zip gcc-136049275038111ec39775a11970db0fd2769f96.tar.gz gcc-136049275038111ec39775a11970db0fd2769f96.tar.bz2 |
re PR regression/52020 (ICE in immed_double_const, at emit-rtl.c:544)
2012-01-27 Richard Guenther <rguenther@suse.de>
PR tree-optimization/52020
* tree-sra.c (sra_modify_assign): Do not transform clobbers.
From-SVN: r183633
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/tree-sra.c | 14 |
2 files changed, 19 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 60bc0a9..8b2e0c6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2012-01-27 Richard Guenther <rguenther@suse.de> + PR tree-optimization/52020 + * tree-sra.c (sra_modify_assign): Do not transform clobbers. + +2012-01-27 Richard Guenther <rguenther@suse.de> + * ipa-pure-const.c (check_stmt): Clobbers do not make a function non-const/pure. diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index fa67e94..6757958 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -2836,6 +2836,20 @@ sra_modify_constructor_assign (gimple *stmt, gimple_stmt_iterator *gsi) if (!acc) return SRA_AM_NONE; + if (gimple_clobber_p (*stmt)) + { + /* Remove clobbers of fully scalarized variables, otherwise + do nothing. */ + if (acc->grp_covered) + { + unlink_stmt_vdef (*stmt); + gsi_remove (gsi, true); + return SRA_AM_REMOVED; + } + else + return SRA_AM_NONE; + } + loc = gimple_location (*stmt); if (VEC_length (constructor_elt, CONSTRUCTOR_ELTS (gimple_assign_rhs1 (*stmt))) > 0) |