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 /gcc/emit-rtl.c | |
parent | f202f404c0a579b92955b4354b2249c2ce9588cb (diff) | |
download | gcc-a33a5782168d47716bb70138e4fe69d2cb083aea.tar.gz |
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
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 |