Operand_Typ := Base_Type (Corresponding_Record_Type (Operand_Typ));
end if;
- -- No displacement of the pointer to the object needed when the type of
- -- the operand is not an interface type and the interface is one of
- -- its parent types (since they share the primary dispatch table).
-
- declare
- Opnd : Entity_Id := Operand_Typ;
-
- begin
- if Is_Access_Type (Opnd) then
- Opnd := Designated_Type (Opnd);
- end if;
-
- if not Is_Interface (Opnd)
- and then Is_Ancestor (Iface_Typ, Opnd, Use_Full_View => True)
- then
- return;
- end if;
- end;
-
-- Evaluate if we can statically displace the pointer to the object
declare