OSDN Git Service

* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Factor out
[pf3gnuchains/gcc-fork.git] / gcc / ada / frontend.adb
index 00eb5ca..3285acc 100644 (file)
@@ -46,12 +46,13 @@ with Prep;
 with Prepcomp;
 with Restrict; use Restrict;
 with Rident;   use Rident;
-with Rtsfind;
+with Rtsfind;  use Rtsfind;
 with Sprint;
 with Scn;      use Scn;
 with Sem;      use Sem;
 with Sem_Aux;
 with Sem_Ch8;  use Sem_Ch8;
+with Sem_SCIL;
 with Sem_Elab; use Sem_Elab;
 with Sem_Prag; use Sem_Prag;
 with Sem_Warn; use Sem_Warn;
@@ -63,40 +64,6 @@ with Tbuild;   use Tbuild;
 with Types;    use Types;
 
 procedure Frontend is
-
-   --  Comment: I think SCIL processing is gettings scattered too much, this
-   --  is a good case, why should the top level frontend driver be doing stuff
-   --  at this level, seems wrong to me. I think we should introduce a new
-   --  unit Sem_SCIL, and move a lot of this SCIL stuff there. ???
-
-   function Check_SCIL_Node (N : Node_Id) return Traverse_Result;
-   --  Process a single node during the tree traversal, verifying that field
-   --  SCIL_Related_Node of SCIL dispatching call nodes reference subprogram
-   --  calls.
-
-   procedure Check_SCIL_Nodes is new Traverse_Proc (Check_SCIL_Node);
-   --  The traversal procedure itself
-
-   ---------------------
-   -- Check_SCIL_Node --
-   ---------------------
-
-   function Check_SCIL_Node (N : Node_Id) return Traverse_Result is
-   begin
-      if Nkind (N) = N_SCIL_Dispatching_Call then
-         if not Nkind_In (SCIL_Related_Node (N), N_Function_Call,
-                                                 N_Procedure_Call_Statement)
-         then
-            pragma Assert (False);
-            raise Program_Error;
-         end if;
-
-         return Skip;
-      else
-         return OK;
-      end if;
-   end Check_SCIL_Node;
-
    Config_Pragmas : List_Id;
    --  Gather configuration pragmas
 
@@ -342,7 +309,7 @@ begin
          --  incorporate subunits at a lower level.
 
          if Operating_Mode = Generate_Code
-            and then Nkind (Unit (Cunit (Main_Unit))) = N_Subunit
+           and then Nkind (Unit (Cunit (Main_Unit))) = N_Subunit
          then
             Operating_Mode := Check_Semantics;
          end if;
@@ -355,8 +322,8 @@ begin
          --  Cleanup processing after completing main analysis
 
          if Operating_Mode = Generate_Code
-            or else (Operating_Mode = Check_Semantics
-                      and then ASIS_Mode)
+           or else (Operating_Mode = Check_Semantics
+                     and then ASIS_Mode)
          then
             Instantiate_Bodies;
          end if;
@@ -384,7 +351,7 @@ begin
 
          --  Output waiting warning messages
 
-         Sem_Warn.Output_Non_Modifed_In_Out_Warnings;
+         Sem_Warn.Output_Non_Modified_In_Out_Warnings;
          Sem_Warn.Output_Unreferenced_Messages;
          Sem_Warn.Check_Unused_Withs;
          Sem_Warn.Output_Unused_Warnings_Off_Warnings;
@@ -404,7 +371,8 @@ begin
    --  dispatching calls reference subprogram calls.
 
    if Generate_SCIL then
-      Check_SCIL_Nodes (Cunit (Main_Unit));
+      pragma Debug (Sem_SCIL.Check_SCIL_Nodes (Cunit (Main_Unit)));
+      null;
    end if;
 
    --  Dump the source now. Note that we do this as soon as the analysis