diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-11 15:41:17 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-11 15:41:17 +0000 |
commit | a33a5782168d47716bb70138e4fe69d2cb083aea (patch) | |
tree | 09b1844407eec90444ce30537e2237526d40cc61 | |
parent | f202f404c0a579b92955b4354b2249c2ce9588cb (diff) | |
download | ppe42-gcc-a33a5782168d47716bb70138e4fe69d2cb083aea.tar.gz ppe42-gcc-a33a5782168d47716bb70138e4fe69d2cb083aea.zip |
2011-01-11 Richard Guenther <rguenther@suse.de>
PR middle-end/45235
* emit-rtl.c (set_mem_attributes_minus_bitpos): Do not mark
volatile MEMs as MEM_READONLY_P.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168663 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/emit-rtl.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1a910c47c43..35b4a696a28 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2011-01-11 Richard Guenther <rguenther@suse.de> + PR middle-end/45235 + * emit-rtl.c (set_mem_attributes_minus_bitpos): Do not mark + volatile MEMs as MEM_READONLY_P. + +2011-01-11 Richard Guenther <rguenther@suse.de> + PR tree-optimization/47239 * tree-ssa-ccp.c (get_value_from_alignment): Punt for FUNCTION_DECLs. diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 42b2da0ea91..0839d0bff78 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -1698,7 +1698,8 @@ set_mem_attributes_minus_bitpos (rtx ref, tree t, int objectp, base = get_base_address (base); if (base && DECL_P (base) && TREE_READONLY (base) - && (TREE_STATIC (base) || DECL_EXTERNAL (base))) + && (TREE_STATIC (base) || DECL_EXTERNAL (base)) + && !TREE_THIS_VOLATILE (base)) MEM_READONLY_P (ref) = 1; /* If this expression uses it's parent's alias set, mark it such |