summaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch5.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-01 13:29:39 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-01 13:29:39 +0000
commit40d4441d9ba640d1eebea85ec4def16e66123b2c (patch)
tree19bd4ae775641dbfbeb38572123fbb8a6e99ec38 /gcc/ada/exp_ch5.adb
parenta11c0d20b68dbd8a1bc65b449d59c1084f601fb3 (diff)
downloadgcc-40d4441d9ba640d1eebea85ec4def16e66123b2c.tar.gz
2011-09-01 Jose Ruiz <ruiz@adacore.com>
* s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying directly the bit array. * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around the linux macros with the same name. * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these wrappers around the CPU_ZERO and CPU_SET linux macros. 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch7.adb (Find_Insertion_List): Removed. (Process_Transient_Objects): Insert the declarations of the hook access type and the hook object before the associated transient object. 2011-09-01 Jose Ruiz <ruiz@adacore.com> * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading package System.Aux_Dec when using restricted run-time libraries which do not have this package. 2011-09-01 Tristan Gingold <gingold@adacore.com> * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless. 2011-09-01 Bob Duff <duff@adacore.com> * sem_attr.adb (Analyze_Access_Attribute): Do not call Kill_Current_Values for P'Unrestricted_Access, where P is library level 2011-09-01 Thomas Quinot <quinot@adacore.com> * exp_ch5.adb: Minor reformatting * gnat_ugn.texi: Fix minor typos. * gcc-interface/Make-lang.in: Update dependencies. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178414 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_ch5.adb')
-rw-r--r--gcc/ada/exp_ch5.adb31
1 files changed, 13 insertions, 18 deletions
diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb
index 0f184552a95..291d68e7b3e 100644
--- a/gcc/ada/exp_ch5.adb
+++ b/gcc/ada/exp_ch5.adb
@@ -62,17 +62,17 @@ with Validsw; use Validsw;
package body Exp_Ch5 is
function Change_Of_Representation (N : Node_Id) return Boolean;
- -- Determine if the right hand side of the assignment N is a type
- -- conversion which requires a change of representation. Called
- -- only for the array and record cases.
+ -- Determine if the right hand side of assignment N is a type conversion
+ -- which requires a change of representation. Called only for the array
+ -- and record cases.
procedure Expand_Assign_Array (N : Node_Id; Rhs : Node_Id);
-- N is an assignment which assigns an array value. This routine process
-- the various special cases and checks required for such assignments,
-- including change of representation. Rhs is normally simply the right
- -- hand side of the assignment, except that if the right hand side is
- -- a type conversion or a qualified expression, then the Rhs is the
- -- actual expression inside any such type conversions or qualifications.
+ -- hand side of the assignment, except that if the right hand side is a
+ -- type conversion or a qualified expression, then the RHS is the actual
+ -- expression inside any such type conversions or qualifications.
function Expand_Assign_Array_Loop
(N : Node_Id;
@@ -3026,21 +3026,16 @@ package body Exp_Ch5 is
-- If the container type is a derived type, the cursor type is
-- found in the package of the parent type.
+ if Is_Derived_Type (Container_Typ) then
+ Pack := Scope (Root_Type (Container_Typ));
+ else
+ Pack := Scope (Container_Typ);
+ end if;
+
Iter_Type := Etype (Name (I_Spec));
if Is_Iterator (Iter_Type) then
- if Is_Derived_Type (Container_Typ) then
- Pack := Scope (Scope (Root_Type (Container_Typ)));
- else
- Pack := Scope (Scope (Container_Typ));
- end if;
-
- else
- if Is_Derived_Type (Container_Typ) then
- Pack := Scope (Root_Type (Container_Typ));
- else
- Pack := Scope (Container_Typ);
- end if;
+ Pack := Scope (Pack);
end if;
-- The "of" case uses an internally generated cursor whose type