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
This commit is contained in:
Richard Guenther 2011-01-11 15:41:17 +00:00 committed by Richard Biener
parent d504eedc67
commit b1923f0a36
2 changed files with 8 additions and 1 deletions

View 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

View 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