aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-07-26 09:26:43 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-07-26 09:26:43 +0000
commit4e89a3faf8c34372ad9952dde29038b8954f3309 (patch)
tree42859ef3f64d8bc588cdb858f32f1888ba76097d
parentd4e075f2bd229a7fc0f707b3272570c9e879879b (diff)
downloadgcc-4e89a3faf8c34372ad9952dde29038b8954f3309.zip
gcc-4e89a3faf8c34372ad9952dde29038b8954f3309.tar.gz
gcc-4e89a3faf8c34372ad9952dde29038b8954f3309.tar.bz2
re PR tree-optimization/45052 (volatile ignored)
2010-07-26 Richard Guenther <rguenther@suse.de> PR tree-optimization/45052 * ipa-pure-const.c (check_stmt): Check volatileness. From-SVN: r162528
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/ipa-pure-const.c7
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8fc9c97..c9d4ea0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2010-07-26 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/45052
+ * ipa-pure-const.c (check_stmt): Check volatileness.
+
2010-07-25 Eric Botcazou <ebotcazou@adacore.com>
PR target/44707
diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c
index 1ff15bf..0e07e44 100644
--- a/gcc/ipa-pure-const.c
+++ b/gcc/ipa-pure-const.c
@@ -651,6 +651,13 @@ 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))
+ {
+ local->pure_const_state = IPA_NEITHER;
+ if (dump_file)
+ fprintf (dump_file, " Volatile stmt is not const/pure\n");
+ }
+
/* Look for loads and stores. */
walk_stmt_load_store_ops (stmt, local,
ipa ? check_ipa_load : check_load,