Commit ae22dcff by Eric Botcazou Committed by Eric Botcazou

calls.c (mem_overlaps_already_clobbered_arg_p): Return true for arg pointer…

calls.c (mem_overlaps_already_clobbered_arg_p): Return true for arg pointer based indexed addressing.

	* calls.c (mem_overlaps_already_clobbered_arg_p): Return true
	for arg pointer based indexed addressing.

From-SVN: r122095
parent 0028647e
2007-02-18 Eric Botcazou <ebotcazou@adacore.com>
* calls.c (mem_overlaps_already_clobbered_arg_p): Return true
for arg pointer based indexed addressing.
2007-02-18 Kazu Hirata <kazu@codesourcery.com>
* config/ia64/ia64.h, config/ia64/ia64.md,
......
......@@ -1481,10 +1481,14 @@ mem_overlaps_already_clobbered_arg_p (rtx addr, unsigned HOST_WIDE_INT size)
if (addr == current_function_internal_arg_pointer)
i = 0;
else if (GET_CODE (addr) == PLUS
&& (XEXP (addr, 0)
== current_function_internal_arg_pointer)
&& XEXP (addr, 0) == current_function_internal_arg_pointer
&& GET_CODE (XEXP (addr, 1)) == CONST_INT)
i = INTVAL (XEXP (addr, 1));
/* Return true for arg pointer based indexed addressing. */
else if (GET_CODE (addr) == PLUS
&& (XEXP (addr, 0) == current_function_internal_arg_pointer
|| XEXP (addr, 1) == current_function_internal_arg_pointer))
return true;
else
return false;
......
2007-02-18 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/tail_call_p.ads, tail_call_p.adb, tail_call.adb: New test.
2007-02-18 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/test_prio_p.adb: Compile with -gnatws.
* lib/gnat.exp (gnat_target_compile): Pass -f to the driver.
-- { dg-do run }
-- { dg-options "-O2 -fno-unit-at-a-time" }
with Tail_Call_P; use Tail_Call_P;
procedure Tail_Call is
begin
Insert (My_Array, 0, 0);
end;
package body Tail_Call_P is
function Start_Side (Element : T) return Index is
begin
if Element = 1 then
raise Program_Error;
end if;
if Element = 0 then
return Second;
else
return First;
end if;
end;
function Segment (Element : T) return T is
begin
if Element /= 0 then
raise Program_Error;
end if;
return 1;
end;
procedure Really_Insert (Into : T; Element : T; Value : T) is
begin
if Into /= 0 then
raise Program_Error;
end if;
end;
procedure Insert (Into : A; Element : T; Value : T) is
begin
Really_Insert (Into (Start_Side (Element)), Segment (Element), Value);
end Insert;
end Tail_Call_P;
package Tail_Call_P is
type T is new Natural;
type Index is (First, Second);
type A is array (Index) of T;
My_Array : A := (0, 0);
procedure Insert (Into : A; Element : T; Value : T);
end Tail_Call_P;
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