OSDN Git Service

More improvements to sparc VIS vec_init code generation.
[pf3gnuchains/gcc-fork.git] / gcc / ada / exp_cg.adb
index 1addb94..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;
 
@@ -409,6 +408,7 @@ package body Exp_CG is
       Nul   : constant Character := Character'First;
       Line  : String (Str'First .. Str'Last + 1);
       Errno : Integer;
+
    begin
       --  Add the null character to the string as required by fputs
 
@@ -478,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
@@ -583,9 +584,9 @@ package body Exp_CG is
 
          if Present (Interface_Alias (Prim))
            or else
-            (Present (Alias (Prim))
-               and then Find_Dispatching_Type (Prim)
-                          /= Find_Dispatching_Type (Alias (Prim)))
+             (Present (Alias (Prim))
+               and then Find_Dispatching_Type (Prim) /=
+                        Find_Dispatching_Type (Alias (Prim)))
          then
             goto Continue;
          end if;
@@ -616,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
@@ -641,8 +643,9 @@ package body Exp_CG is
                   Int_Alias := Interface_Alias (Prim_Op);
 
                   if Present (Int_Alias)
-                    and then not Is_Ancestor
-                                   (Find_Dispatching_Type (Int_Alias), Typ)
+                    and then
+                      not Is_Ancestor (Find_Dispatching_Type (Int_Alias), Typ,
+                                       Use_Full_View => True)
                     and then (Alias (Prim_Op)) = Prim
                   then
                      Write_Char (',');