]> gcc.gnu.org Git - gcc.git/commitdiff
re PR rtl-optimization/45235 (const volatile read moved out of order)
authorRichard Guenther <rguenther@suse.de>
Tue, 11 Jan 2011 15:41:17 +0000 (15:41 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 11 Jan 2011 15:41:17 +0000 (15:41 +0000)
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

gcc/ChangeLog
gcc/emit-rtl.c

index 1a910c47c43b8c48a5be472035f27549ec4ff1cd..35b4a696a28a6c13b61fb79b1b3710890c11f563 100644 (file)
@@ -1,3 +1,9 @@
+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
index 42b2da0ea91f9ddce4c6a413fbdc663c819f0b3e..0839d0bff78cab585c361b102444144aec3897a7 100644 (file)
@@ -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
This page took 0.406958 seconds and 5 git commands to generate.