aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-pure-const.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-01-27 15:49:34 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-01-27 15:49:34 +0000
commitace018f9388c01f3f430e7ab89d4c2e424e7663e (patch)
tree0c04ec091ef10bd60dd9a1ebcd58d05b54dbc651 /gcc/ipa-pure-const.c
parentaff8659424a98c714d2de2eeac0e80f7751a87a1 (diff)
downloadgcc-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
Diffstat (limited to 'gcc/ipa-pure-const.c')
-rw-r--r--gcc/ipa-pure-const.c3
1 files changed, 2 insertions, 1 deletions
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)