Commit 5e9579b4 by Gary Dismukes Committed by Arnaud Charlet

exp_ch5.adb (Expand_Assign_Array): For the case where the assignment involves a…

exp_ch5.adb (Expand_Assign_Array): For the case where the assignment involves a target that has a specified address...

2009-04-20  Gary Dismukes  <dismukes@adacore.com>

	* exp_ch5.adb (Expand_Assign_Array): For the case where the assignment
	involves a target that has a specified address, don't set Forward_OK
	and Backward_OK to False if the rhs is an aggregate, since overlap
	can't occur.

From-SVN: r146403
parent 1414183d
...@@ -309,9 +309,13 @@ package body Exp_Ch5 is ...@@ -309,9 +309,13 @@ package body Exp_Ch5 is
end if; end if;
-- If either operand has an address clause clear Backwards_OK and -- If either operand has an address clause clear Backwards_OK and
-- Forwards_OK, since we cannot tell if the operands overlap. -- Forwards_OK, since we cannot tell if the operands overlap. We
-- exclude this treatment when Rhs is an aggregate, since we know
-- that overlap can't occur.
if Has_Address_Clause (Lhs) or else Has_Address_Clause (Rhs) then if (Has_Address_Clause (Lhs) and then Nkind (Rhs) /= N_Aggregate)
or else Has_Address_Clause (Rhs)
then
Set_Forwards_OK (N, False); Set_Forwards_OK (N, False);
Set_Backwards_OK (N, False); Set_Backwards_OK (N, False);
end if; end if;
......
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