diff options
author | Richard Guenther <rguenther@suse.de> | 2012-01-27 15:49:34 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2012-01-27 15:49:34 +0000 |
commit | ace018f9388c01f3f430e7ab89d4c2e424e7663e (patch) | |
tree | 0c04ec091ef10bd60dd9a1ebcd58d05b54dbc651 | |
parent | aff8659424a98c714d2de2eeac0e80f7751a87a1 (diff) | |
download | gcc-ace018f9388c01f3f430e7ab89d4c2e424e7663e.zip gcc-ace018f9388c01f3f430e7ab89d4c2e424e7663e.tar.gz gcc-ace018f9388c01f3f430e7ab89d4c2e424e7663e.tar.bz2 |
ipa-pure-const.c (check_stmt): Clobbers do not make a function non-const/pure.
2012-01-27 Richard Guenther <rguenther@suse.de>
* ipa-pure-const.c (check_stmt): Clobbers do not make a
function non-const/pure.
From-SVN: r183632
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ipa-pure-const.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 009203b..60bc0a9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2012-01-27 Richard Guenther <rguenther@suse.de> + * ipa-pure-const.c (check_stmt): Clobbers do not make a + function non-const/pure. + +2012-01-27 Richard Guenther <rguenther@suse.de> + PR tree-optimization/50444 * tree-sra.c (build_ref_for_offset): Properly adjust the MEM_REF type for unaligned accesses. diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c index 82e24cf..e8b21f9 100644 --- a/gcc/ipa-pure-const.c +++ b/gcc/ipa-pure-const.c @@ -652,7 +652,8 @@ check_stmt (gimple_stmt_iterator *gsip, funct_state local, bool ipa) print_gimple_stmt (dump_file, stmt, 0, 0); } - if (gimple_has_volatile_ops (stmt)) + if (gimple_has_volatile_ops (stmt) + && !gimple_clobber_p (stmt)) { local->pure_const_state = IPA_NEITHER; if (dump_file) |