----------------------------
procedure Build_Constrained_Type (Positional : Boolean) is
- Loc : constant Source_Ptr := Sloc (N);
- Agg_Type : constant Entity_Id := Make_Temporary (Loc, 'A');
+ Agg_Type : constant Entity_Id := Make_Temporary (Loc, 'A');
Decl : Node_Id;
- Typ : constant Entity_Id := Etype (N);
- Indexes : constant List_Id := New_List;
+ Indexes : constant List_Id := New_List;
Num : Nat;
Sub_Agg : Node_Id;
if Positional then
Sub_Agg := N;
- for D in 1 .. Number_Dimensions (Typ) loop
+ for D in 1 .. Aggr_Dimension loop
Num := List_Length (Expressions (Sub_Agg));
Append_To (Indexes,
Make_Range (Loc,
- Low_Bound => Make_Integer_Literal (Loc, 1),
+ Low_Bound => Make_Integer_Literal (Loc, Uint_1),
High_Bound => Make_Integer_Literal (Loc, Num)));
Sub_Agg := First (Expressions (Sub_Agg));
-- is not processable by the back end, therefore not necessarily
-- positional. Retrieve each dimension bounds (computed earlier).
- for D in 1 .. Number_Dimensions (Typ) loop
+ for D in 1 .. Aggr_Dimension loop
Append_To (Indexes,
Make_Range (Loc,
Low_Bound => Aggr_Low (D),
Discrete_Subtype_Definitions => Indexes,
Component_Definition =>
Make_Component_Definition (Loc,
- Aliased_Present => False,
Subtype_Indication =>
New_Occurrence_Of (Component_Type (Typ), Loc))));
Ind_Bounds : constant Range_Nodes :=
Get_Index_Bounds (Index_Bounds_Node);
- Cond : Node_Id := Empty;
+ Cond : Node_Id;
begin
-- For a null array aggregate check that high bound (i.e., low
-- If this is an array of tasks, it will be expanded into build-in-place
-- assignments. Build an activation chain for the tasks now.
- if Has_Task (Etype (N)) then
+ if Has_Task (Typ) then
Build_Activation_Chain_Entity (N);
end if;