summaryrefslogtreecommitdiff
path: root/gcc/tree-predcom.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-07-29 09:54:23 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-07-29 09:54:23 +0000
commit64fb0d3a7878671e4df0b58ab3aa00e4e860e62e (patch)
tree41d80cf5eccf0548e09244ad15e7faa13f77bb92 /gcc/tree-predcom.c
parent6130646b8811ec5af4d58bd08fee7ebd8ffbc973 (diff)
downloadgcc-64fb0d3a7878671e4df0b58ab3aa00e4e860e62e.tar.gz
re PR middle-end/49893 (-O3 generates wrong code for volatile)
2011-07-29 Richard Guenther <rguenther@suse.de> PR tree-optimization/49893 * tree-predcom.c (suitable_reference_p): Volatile references are not suitable. From-SVN: r176921
Diffstat (limited to 'gcc/tree-predcom.c')
-rw-r--r--gcc/tree-predcom.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c
index 94b0512bdaf..ac2314778a8 100644
--- a/gcc/tree-predcom.c
+++ b/gcc/tree-predcom.c
@@ -598,6 +598,7 @@ suitable_reference_p (struct data_reference *a, enum ref_step_type *ref_step)
tree ref = DR_REF (a), step = DR_STEP (a);
if (!step
+ || TREE_THIS_VOLATILE (ref)
|| !is_gimple_reg_type (TREE_TYPE (ref))
|| tree_could_throw_p (ref))
return false;