-- 10. No controlled actions need to be generated for components
- -- 11. The backend is a No_VM backend and the array has aliased components
+ -- 11. For a VM back end, the array should have no aliased components
function Backend_Processing_Possible (N : Node_Id) return Boolean is
Typ : constant Entity_Id := Etype (N);
Ref := Convert_To (Init_Typ, New_Copy_Tree (Target));
Set_Assignment_OK (Ref);
- Append_List_To (L,
- Build_Initialization_Call (Loc,
- Id_Ref => Ref,
- Typ => Init_Typ,
- In_Init_Proc => Within_Init_Proc,
- With_Default_Init => Has_Default_Init_Comps (N)
- or else
- Has_Task (Base_Type (Init_Typ))));
-
- if Is_Constrained (Entity (A))
- and then Has_Discriminants (Entity (A))
- then
- Check_Ancestor_Discriminants (Entity (A));
+ if not Is_Interface (Init_Typ) then
+ Append_List_To (L,
+ Build_Initialization_Call (Loc,
+ Id_Ref => Ref,
+ Typ => Init_Typ,
+ In_Init_Proc => Within_Init_Proc,
+ With_Default_Init => Has_Default_Init_Comps (N)
+ or else
+ Has_Task (Base_Type (Init_Typ))));
+
+ if Is_Constrained (Entity (A))
+ and then Has_Discriminants (Entity (A))
+ then
+ Check_Ancestor_Discriminants (Entity (A));
+ end if;
end if;
-- Handle calls to C++ constructors
N_Discriminant_Specification
then
Flist := Empty;
- else
+
+ elsif Needs_Finalization (Typ) then
Flist := Find_Final_List (Access_Type);
+
+ -- Otherwise there are no controlled actions to be performed.
+
+ else
+ Flist := Empty;
end if;
if Is_Array_Type (Typ) then
-- total number of components is safe enough to expand.
function Is_Flat (N : Node_Id; Dims : Int) return Boolean;
- -- Return True iff the array N is flat (which is not rivial in the case
+ -- Return True iff the array N is flat (which is not trivial in the case
-- of multidimensionsl aggregates).
-----------------------------
end if;
end if;
- -- Range cases merge with Lo,Hi said
+ -- Range cases merge with Lo,Hi set
if not Compile_Time_Known_Value (Lo)
or else