Commit ebcc3d93 by Eric Botcazou Committed by Eric Botcazou

tree.def (TARGET_MEM_REF): Update comment.

	* tree.def (TARGET_MEM_REF): Update comment.
	* alias.c (get_alias_set): Retrieve the original memory reference for
	a TARGET_MEM_REF before proceeding.

From-SVN: r153796
parent 958dd42b
2009-11-01 Eric Botcazou <ebotcazou@adacore.com>
* tree.def (TARGET_MEM_REF): Update comment.
* alias.c (get_alias_set): Retrieve the original memory reference for
a TARGET_MEM_REF before proceeding.
2009-10-31 Anatoly Sokolov <aesok@post.ru> 2009-10-31 Anatoly Sokolov <aesok@post.ru>
* config/frv/frv.c (frv_function_value, frv_libcall_value, * config/frv/frv.c (frv_function_value, frv_libcall_value,
...@@ -640,7 +640,7 @@ get_alias_set (tree t) ...@@ -640,7 +640,7 @@ get_alias_set (tree t)
aren't types. */ aren't types. */
if (! TYPE_P (t)) if (! TYPE_P (t))
{ {
tree inner = t; tree inner;
/* Remove any nops, then give the language a chance to do /* Remove any nops, then give the language a chance to do
something with this tree before we look at it. */ something with this tree before we look at it. */
...@@ -649,8 +649,13 @@ get_alias_set (tree t) ...@@ -649,8 +649,13 @@ get_alias_set (tree t)
if (set != -1) if (set != -1)
return set; return set;
/* Retrieve the original memory reference if needed. */
if (TREE_CODE (t) == TARGET_MEM_REF)
t = TMR_ORIGINAL (t);
/* First see if the actual object referenced is an INDIRECT_REF from a /* First see if the actual object referenced is an INDIRECT_REF from a
restrict-qualified pointer or a "void *". */ restrict-qualified pointer or a "void *". */
inner = t;
while (handled_component_p (inner)) while (handled_component_p (inner))
{ {
inner = TREE_OPERAND (inner, 0); inner = TREE_OPERAND (inner, 0);
......
2009-11-01 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/opt5.adb: New test.
2009-11-01 Tobias Burnus <burnus@net-b.de> 2009-11-01 Tobias Burnus <burnus@net-b.de>
PR fortran/41872 PR fortran/41872
......
-- { dg-do run }
-- { dg-options "-O2" }
procedure Opt5 is
type Varray is array (1 .. 4) of Natural;
procedure Check_All_Ones (A : Varray) is
begin
for J in A'Range loop
if (A (J)) /= 1 then
raise Program_Error;
end if;
end loop;
end;
X : constant Varray := (1, 1, 1, 1);
begin
Check_All_Ones (X);
end;
...@@ -969,7 +969,7 @@ DEFTREECODE (REALIGN_LOAD_EXPR, "realign_load", tcc_expression, 3) ...@@ -969,7 +969,7 @@ DEFTREECODE (REALIGN_LOAD_EXPR, "realign_load", tcc_expression, 3)
sizetype or a pointer type (if SYMBOL is NULL). sizetype or a pointer type (if SYMBOL is NULL).
The sixth argument is the reference to the original memory access, which The sixth argument is the reference to the original memory access, which
is preserved for the purposes of the RTL alias analysis. */ is preserved for the purpose of alias analysis. */
DEFTREECODE (TARGET_MEM_REF, "target_mem_ref", tcc_reference, 6) DEFTREECODE (TARGET_MEM_REF, "target_mem_ref", tcc_reference, 6)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment