------------------------
function Check_Derived_Type return Boolean is
- E : Entity_Id;
- Elmt : Elmt_Id;
- List : Elist_Id;
- New_Subp : Entity_Id;
- Op_Elmt : Elmt_Id;
- Subp : Entity_Id;
+ E : Entity_Id;
+ Derived_Elmt : Elmt_Id;
+ Derived_Op : Entity_Id;
+ Derived_Ops : Elist_Id;
+ Parent_Elmt : Elmt_Id;
+ Parent_Op : Entity_Id;
begin
-- Traverse list of entities in the current scope searching for
-- Disable this test if Derived_Type completes an incomplete
-- type because in such case more primitives can be added
-- later to the list of primitives of Derived_Type by routine
- -- Process_Incomplete_Dependents
+ -- Process_Incomplete_Dependents.
return True;
end if;
Next_Entity (E);
end loop;
- List := Collect_Primitive_Operations (Derived_Type);
- Elmt := First_Elmt (List);
+ Derived_Ops := Collect_Primitive_Operations (Derived_Type);
- Op_Elmt := First_Elmt (Op_List);
- while Present (Op_Elmt) loop
- Subp := Node (Op_Elmt);
- New_Subp := Node (Elmt);
+ Derived_Elmt := First_Elmt (Derived_Ops);
+ Parent_Elmt := First_Elmt (Op_List);
+ while Present (Parent_Elmt) loop
+ Parent_Op := Node (Parent_Elmt);
+ Derived_Op := Node (Derived_Elmt);
-- At this early stage Derived_Type has no entities with attribute
-- Interface_Alias. In addition, such primitives are always
-- Therefore, if found we can safely stop processing pending
-- entities.
- exit when Present (Interface_Alias (Subp));
+ exit when Present (Interface_Alias (Parent_Op));
-- Handle hidden entities
- if not Is_Predefined_Dispatching_Operation (Subp)
- and then Is_Hidden (Subp)
+ if not Is_Predefined_Dispatching_Operation (Parent_Op)
+ and then Is_Hidden (Parent_Op)
then
- if Present (New_Subp)
- and then Primitive_Names_Match (Subp, New_Subp)
+ if Present (Derived_Op)
+ and then Primitive_Names_Match (Parent_Op, Derived_Op)
then
- Next_Elmt (Elmt);
+ Next_Elmt (Derived_Elmt);
end if;
else
- if not Present (New_Subp)
- or else Ekind (Subp) /= Ekind (New_Subp)
- or else not Primitive_Names_Match (Subp, New_Subp)
+ if No (Derived_Op)
+ or else Ekind (Parent_Op) /= Ekind (Derived_Op)
+ or else not Primitive_Names_Match (Parent_Op, Derived_Op)
then
return False;
end if;
- Next_Elmt (Elmt);
+ Next_Elmt (Derived_Elmt);
end if;
- Next_Elmt (Op_Elmt);
+ Next_Elmt (Parent_Elmt);
end loop;
return True;