]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/ada/exp_disp.adb
[multiple changes]
[thirdparty/gcc.git] / gcc / ada / exp_disp.adb
index 905311b6eb923c7e1f7ee79fe42fc3f6c8aeec96..99105e0ea4f1052aee2dc73522dfc9e975362279 100644 (file)
@@ -1138,25 +1138,6 @@ package body Exp_Disp is
          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