diff options
author | Richard Guenther <rguenther@suse.de> | 2011-01-11 15:41:17 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2011-01-11 15:41:17 +0000 |
commit | b1923f0a36a1b344b22a3850989f6339d0c2ed56 (patch) | |
tree | 09b1844407eec90444ce30537e2237526d40cc61 /gcc | |
parent | d504eedc67a7bd1def08808d72852e9990be21f1 (diff) | |
download | gcc-b1923f0a36a1b344b22a3850989f6339d0c2ed56.zip gcc-b1923f0a36a1b344b22a3850989f6339d0c2ed56.tar.gz gcc-b1923f0a36a1b344b22a3850989f6339d0c2ed56.tar.bz2 |
re PR rtl-optimization/45235 (const volatile read moved out of order)
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.
From-SVN: r168663
Diffstat (limited to 'gcc')
-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 1a910c4..35b4a69 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 42b2da0e..0839d0b 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 |