aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch7.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2009-04-15 14:43:58 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2009-04-15 14:43:58 +0200
commit1f07382dbe0844687cb1f2d0bcfe2daae1df9745 (patch)
tree384f96baae68288a3efecddd80744a86175fa651 /gcc/ada/exp_ch7.adb
parent6cc60200ce2b97d6ee4713b5924cffd09ce1cca6 (diff)
downloadgcc-1f07382dbe0844687cb1f2d0bcfe2daae1df9745.zip
gcc-1f07382dbe0844687cb1f2d0bcfe2daae1df9745.tar.gz
gcc-1f07382dbe0844687cb1f2d0bcfe2daae1df9745.tar.bz2
[multiple changes]
2009-04-15 Robert Dewar <dewar@adacore.com> * gnatchop.adb (BOM_Length): New global variable (Write_Unit): Add new parameter Write_BOM (Write_Chopped_Files): Check for BOM and set Write_BOM for call to Write_Unit * gnat_ugn.texi: Add note on propagation of BOM by gnatchop 2009-04-15 Geert Bosch <bosch@adacore.com> * system-mingw-x86_64.ads, system-darwin-x86_64.ads (Backend_Overflow_Checks): Set to True. 2009-04-15 Gary Dismukes <dismukes@adacore.com> * par-ch3.adb (P_Type_Declaration): Issue an error if the synchronized keyword is given in a record extension. 2009-04-15 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch7.adb (Expand_Ctrl_Function_Call): Procede with the expansion of a controlled function call in the context of a record aggregate. This does not apply to array aggregates since the call will be expanded into assignments. 2009-04-15 Ed Falis <falis@adacore.com> * s-osinte-vxworks-kernel.adb, s-osinte-vxworks.adb, s-osinte-vxworks.ads s-vxwext.ads, s-vxwext-kernel.adb, s-vxwext-kernel.ads: Reorganize s-osinte-vxworks* and s-vxwext*. From-SVN: r146108
Diffstat (limited to 'gcc/ada/exp_ch7.adb')
-rw-r--r--gcc/ada/exp_ch7.adb16
1 files changed, 9 insertions, 7 deletions
diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb
index c44c17f..23170bc 100644
--- a/gcc/ada/exp_ch7.adb
+++ b/gcc/ada/exp_ch7.adb
@@ -1404,12 +1404,14 @@ package body Exp_Ch7 is
-- Attach_To_Final_List (_Lx, Resx (Resx'last)._controller, 3);
- -- If the context is an aggregate, the call will be expanded into an
- -- assignment, and the attachment will be done when the aggregate
+ -- If the context is an array aggregate, the call will be expanded into
+ -- an assignment, and the attachment will be done when the aggregate
-- expansion is complete. See body of Exp_Aggr for the treatment of
-- other controlled components.
- if Nkind (Parent (N)) = N_Aggregate then
+ if Nkind (Parent (N)) = N_Aggregate
+ and then Is_Array_Type (Etype (Parent (N)))
+ then
return;
end if;
@@ -1424,10 +1426,10 @@ package body Exp_Ch7 is
if Is_Array_Type (T2) then
Len_Ref :=
Make_Attribute_Reference (Loc,
- Prefix =>
- Duplicate_Subexpr_Move_Checks
- (Unchecked_Convert_To (T2, Ref)),
- Attribute_Name => Name_Length);
+ Prefix =>
+ Duplicate_Subexpr_Move_Checks
+ (Unchecked_Convert_To (T2, Ref)),
+ Attribute_Name => Name_Length);
end if;
while Is_Array_Type (T2) loop