diff options
author | Gary Dismukes <dismukes@adacore.com> | 2009-04-20 14:29:26 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-20 14:29:26 +0200 |
commit | 5e9579b495d638798241fdc2e59de2b7b13d67e5 (patch) | |
tree | 7e5037ea5a1eefc8570a202cb87e17e5ac79c97a | |
parent | 1414183dedbfa408e8c247e77779b189c3a819bc (diff) | |
download | gcc-5e9579b495d638798241fdc2e59de2b7b13d67e5.zip gcc-5e9579b495d638798241fdc2e59de2b7b13d67e5.tar.gz gcc-5e9579b495d638798241fdc2e59de2b7b13d67e5.tar.bz2 |
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
-rw-r--r-- | gcc/ada/exp_ch5.adb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb index 6afcc6f..c77ff05 100644 --- a/gcc/ada/exp_ch5.adb +++ b/gcc/ada/exp_ch5.adb @@ -309,9 +309,13 @@ package body Exp_Ch5 is end if; -- 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_Backwards_OK (N, False); end if; |