From: Richard Guenther Date: Tue, 11 Jan 2011 15:41:17 +0000 (+0000) Subject: re PR rtl-optimization/45235 (const volatile read moved out of order) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b1923f0a36a1b344b22a3850989f6339d0c2ed56;p=gcc.git re PR rtl-optimization/45235 (const volatile read moved out of order) 2011-01-11 Richard Guenther PR middle-end/45235 * emit-rtl.c (set_mem_attributes_minus_bitpos): Do not mark volatile MEMs as MEM_READONLY_P. From-SVN: r168663 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1a910c47c43..35b4a696a28 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-01-11 Richard Guenther + + 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 PR tree-optimization/47239 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