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 Guenther <rguenther@suse.de>2012-01-27 15:49:34 +0000
commitb4a96a1dc5ea8e802f978180b1279064524357f5 (patch)
tree0c04ec091ef10bd60dd9a1ebcd58d05b54dbc651 /gcc/ipa-pure-const.c
parent385a23853e2b26f2c9516b22654f51d0b21e7840 (diff)
2012-01-27 Richard Guenther <rguenther@suse.de>
* ipa-pure-const.c (check_stmt): Clobbers do not make a function non-const/pure. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@183632 138bc75d-0d04-0410-961f-82ee72b054a4
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 82e24cf5a01..e8b21f9fc6b 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)