OSDN Git Service

More improvements to sparc VIS vec_init code generation.
[pf3gnuchains/gcc-fork.git] / gcc / ada / exp_cg.adb
index 4aa7b0b..e5f618f 100644 (file)
@@ -24,7 +24,6 @@
 ------------------------------------------------------------------------------
 
 with Atree;    use Atree;
-with Debug;    use Debug;
 with Einfo;    use Einfo;
 with Elists;   use Elists;
 with Exp_Disp; use Exp_Disp;
@@ -110,11 +109,9 @@ package body Exp_CG is
 
    begin
       --  No output if the "ci" output file has not been previously opened
-      --  by toplev.c. Temporarily the output is also disabled with -gnatd.Z
+      --  by toplev.c
 
-      if Callgraph_Info_File = Null_Address
-        or else not Debug_Flag_Dot_ZZ
-      then
+      if Callgraph_Info_File = Null_Address then
          return;
       end if;
 
@@ -324,7 +321,7 @@ package body Exp_CG is
                   end if;
                end loop;
 
-               if Ada_Version >= Ada_05 then
+               if Ada_Version >= Ada_2005 then
                   for J in Predef_Names_05'Range loop
                      Get_Name_String (Predef_Names_05 (J));
 
@@ -357,7 +354,8 @@ package body Exp_CG is
            or else Entity_Is_In_Main_Unit (Current_Scope)
          then
             --  Register a copy of the dispatching call node. Needed since the
-            --  node containing a dispatching call is rewriten by the expander.
+            --  node containing a dispatching call is rewritten by the
+            --  expander.
 
             declare
                Copy : constant Node_Id := New_Copy (N);
@@ -393,11 +391,12 @@ package body Exp_CG is
    -----------------
 
    function Slot_Number (Prim : Entity_Id) return Uint is
+      E : constant Entity_Id := Ultimate_Alias (Prim);
    begin
-      if Is_Predefined_Dispatching_Operation (Prim) then
-         return -DT_Position (Prim);
+      if Is_Predefined_Dispatching_Operation (E) then
+         return -DT_Position (E);
       else
-         return DT_Position (Prim);
+         return DT_Position (E);
       end if;
    end Slot_Number;
 
@@ -479,7 +478,8 @@ package body Exp_CG is
         and then
           Is_Ancestor
             (Find_Dispatching_Type (Ultimate_Alias (Prim)),
-             Root_Type (Ctrl_Typ))
+             Root_Type (Ctrl_Typ),
+             Use_Full_View => True)
       then
          --  This is a special case in which we generate in the ci file the
          --  slot number of the renaming primitive (i.e. Base2) but instead of
@@ -617,7 +617,8 @@ package body Exp_CG is
          if Present (Overridden_Operation (Prim))
            and then
              Is_Ancestor
-               (Find_Dispatching_Type (Overridden_Operation (Prim)), Typ)
+               (Find_Dispatching_Type (Overridden_Operation (Prim)), Typ,
+                Use_Full_View => True)
          then
             Write_Char (',');
             Write_Int
@@ -643,7 +644,8 @@ package body Exp_CG is
 
                   if Present (Int_Alias)
                     and then
-                      not Is_Ancestor (Find_Dispatching_Type (Int_Alias), Typ)
+                      not Is_Ancestor (Find_Dispatching_Type (Int_Alias), Typ,
+                                       Use_Full_View => True)
                     and then (Alias (Prim_Op)) = Prim
                   then
                      Write_Char (',');