From ace018f9388c01f3f430e7ab89d4c2e424e7663e Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Fri, 27 Jan 2012 15:49:34 +0000 Subject: ipa-pure-const.c (check_stmt): Clobbers do not make a function non-const/pure. 2012-01-27 Richard Guenther * ipa-pure-const.c (check_stmt): Clobbers do not make a function non-const/pure. From-SVN: r183632 --- gcc/ipa-pure-const.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/ipa-pure-const.c') 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) -- cgit v1.1