2009-07-15 Robert Dewar <dewar@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Jul 2009 13:06:43 +0000 (13:06 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Jul 2009 13:06:43 +0000 (13:06 +0000)
* par_sco.adb (Traverse_Declarations_Or_Statements): Add processing for
N_Label. Remove SCO table entry for entry point (not used).

* par_sco.ads: Remove SCO entry point type (not used)

* switch.adb: Minor code clean up.

2009-07-15  Eric Botcazou  <ebotcazou@adacore.com>

* exp_dbug.ads (Base Record Types): Document enhanced encoding.

2009-07-15  Thomas Quinot  <quinot@adacore.com>

* gnatls.adb: Minor reformatting

* gnatcmd.adb: Minor code reorganization

2009-07-15  Ed Schonberg  <schonberg@adacore.com>

* exp_util.adb (Component_May_Be_Bit_Aligned): Use underlying type to
determine whether a component of a private type has a composite type.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149688 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/exp_dbug.ads
gcc/ada/exp_util.adb
gcc/ada/gnatcmd.adb
gcc/ada/gnatls.adb
gcc/ada/par_sco.adb
gcc/ada/par_sco.ads
gcc/ada/switch.adb

index 8139e60..13cd178 100644 (file)
@@ -1,5 +1,29 @@
 2009-07-15  Robert Dewar  <dewar@adacore.com>
 
+       * par_sco.adb (Traverse_Declarations_Or_Statements): Add processing for
+       N_Label. Remove SCO table entry for entry point (not used).
+
+       * par_sco.ads: Remove SCO entry point type (not used)
+
+       * switch.adb: Minor code clean up.
+
+2009-07-15  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * exp_dbug.ads (Base Record Types): Document enhanced encoding.
+
+2009-07-15  Thomas Quinot  <quinot@adacore.com>
+
+       * gnatls.adb: Minor reformatting
+
+       * gnatcmd.adb: Minor code reorganization
+
+2009-07-15  Ed Schonberg  <schonberg@adacore.com>
+
+       * exp_util.adb (Component_May_Be_Bit_Aligned): Use underlying type to
+       determine whether a component of a private type has a composite type.
+
+2009-07-15  Robert Dewar  <dewar@adacore.com>
+
        * sem_ch10.adb: Minor reformatting throughout
        Minor code reorganization (put nested subprograms in alpha order)
 
index 15e83aa..842456e 100644 (file)
@@ -844,9 +844,11 @@ package Exp_Dbug is
 
       --  Specifically, if this name is x, then we produce a record type named
       --  x___XVS consisting of one field. The name of this field is that of
-      --  the actual type being encoded, which we'll call y (the type of this
-      --  single field is arbitrary). Both x and y may have corresponding
-      --  ___XVE types.
+      --  the actual type being encoded, which we'll call y. The type of this
+      --  single field can be either an arbitrary non-reference type, e.g. an
+      --  integer type, or a reference type; in the latter case, the referenced
+      --  type is also the actual type being encoded y. Both x and y may have
+      --  corresponding ___XVE types.
 
       --  The size of the objects typed as x should be obtained from the
       --  structure of x (and x___XVE, if applicable) as for ordinary types
index b396ee5..1031050 100644 (file)
@@ -913,6 +913,7 @@ package body Exp_Util is
    ----------------------------------
 
    function Component_May_Be_Bit_Aligned (Comp : Entity_Id) return Boolean is
+      UT : constant Entity_Id := Underlying_Type (Etype (Comp));
    begin
       --  If no component clause, then everything is fine, since the back end
       --  never bit-misaligns by default, even if there is a pragma Packed for
@@ -924,8 +925,8 @@ package body Exp_Util is
 
       --  It is only array and record types that cause trouble
 
-      if not Is_Record_Type (Etype (Comp))
-        and then not Is_Array_Type (Etype (Comp))
+      if not Is_Record_Type (UT)
+        and then not Is_Array_Type (UT)
       then
          return False;
 
@@ -934,8 +935,8 @@ package body Exp_Util is
       --  back end can handle these cases correctly.
 
       elsif Esize (Comp) <= 64
-        and then (Is_Record_Type (Etype (Comp))
-                   or else Is_Bit_Packed_Array (Etype (Comp)))
+        and then (Is_Record_Type (UT)
+                   or else Is_Bit_Packed_Array (UT))
       then
          return False;
 
index c3ec70c..f0e7e74 100644 (file)
@@ -603,7 +603,7 @@ procedure GNATCmd is
       if Project = No_Project then
          return False;
 
-      elsif All_Projects or Project = Root_Project then
+      elsif All_Projects or else Project = Root_Project then
          return True;
 
       elsif The_Command = Metric then
@@ -2074,7 +2074,7 @@ begin
             Process_Link;
          end if;
 
-         if The_Command = Link or The_Command = Bind then
+         if The_Command = Link or else The_Command = Bind then
 
             --  For files that are specified as relative paths with directory
             --  information, we convert them to absolute paths, with parent
index 36e2ee6..1b7666f 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2008, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2009, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -185,19 +185,19 @@ procedure Gnatls is
    function Image (Restriction : Restriction_Id) return String;
    --  Returns the capitalized image of Restriction
 
-   ---------------------------------------
-   -- GLADE specific output subprograms --
-   ---------------------------------------
+   ------------------------------------------
+   -- GNATDIST specific output subprograms --
+   ------------------------------------------
 
-   package GLADE is
+   package GNATDIST is
 
-      --  Any modification to this subunit requires a synchronization
-      --  with the GLADE implementation.
+      --  Any modification to this subunit requires a synchronization with
+      --  GNATDIST sources.
 
       procedure Output_ALI    (A : ALI_Id);
       procedure Output_No_ALI (Afile : File_Name_Type);
 
-   end GLADE;
+   end GNATDIST;
 
    -----------------
    -- Add_Lib_Dir --
@@ -347,7 +347,7 @@ procedure Gnatls is
       Source_End := Source_Start - 1;
 
       if Print_Source then
-         Source_End   := Source_Start + Max_Src_Length;
+         Source_End := Source_Start + Max_Src_Length;
       end if;
    end Find_General_Layout;
 
@@ -392,11 +392,11 @@ procedure Gnatls is
       end if;
    end Find_Status;
 
-   -----------
-   -- GLADE --
-   -----------
+   --------------
+   -- GNATDIST --
+   --------------
 
-   package body GLADE is
+   package body GNATDIST is
 
       N_Flags   : Natural;
       N_Indents : Natural := 0;
@@ -610,7 +610,7 @@ procedure Gnatls is
 
             --  There is no full source name. This occurs for instance when a
             --  withed unit has a spec file but no body file. This situation
-            --  is not a problem for GLADE since the unit may be located on
+            --  is not a problem for GNATDIST since the unit may be located on
             --  a partition we do not want to build. However, we need to
             --  locate the spec file and to find its full source name.
             --  Replace the body file name with the spec file name used to
@@ -794,7 +794,7 @@ procedure Gnatls is
          N_Indents := N_Indents - 1;
       end Output_With;
 
-   end GLADE;
+   end GNATDIST;
 
    -----------
    -- Image --
@@ -1754,7 +1754,7 @@ begin
 
       if Ali_File = No_File then
          if Very_Verbose_Mode then
-            GLADE.Output_No_ALI (Lib_File_Name (Main_File));
+            GNATDIST.Output_No_ALI (Lib_File_Name (Main_File));
 
          else
             Write_Str ("Can't find library info for ");
@@ -1791,7 +1791,7 @@ begin
 
    if Very_Verbose_Mode then
       for A in ALIs.First .. ALIs.Last loop
-         GLADE.Output_ALI (A);
+         GNATDIST.Output_ALI (A);
       end loop;
 
       return;
index 897b359..663959d 100644 (file)
@@ -71,13 +71,6 @@ package body Par_SCO is
    --      To   = ending sloc
    --      Last = unused
 
-   --    Entry
-   --      C1   = 'Y'
-   --      C2   = ' '
-   --      From = starting sloc
-   --      To   = ending sloc
-   --      Last = unused
-
    --    Exit
    --      C1   = 'T'
    --      C2   = ' '
@@ -659,9 +652,9 @@ package body Par_SCO is
 
                case T.C1 is
 
-                  --  Statements, entry, exit
+                  --  Statements, exit
 
-                  when 'S' | 'Y' | 'T' =>
+                  when 'S' | 'T' =>
                      Write_Info_Char (' ');
                      Output_Range (T.From, T.To);
 
@@ -907,6 +900,11 @@ package body Par_SCO is
                   Sloc_Range (N, From, To);
                   Set_Table_Entry ('T', ' ', From, To, False);
 
+               --  Label (breaks statement sequence)
+
+               when N_Label =>
+                  Set_Statement_Entry;
+
                --  Block statement
 
                when N_Block_Statement =>
index 5adee95..a977a11 100644 (file)
@@ -98,15 +98,6 @@ package Par_SCO is
 
    --      CS sloc-range
 
-   --  Entry points
-
-   --    An entry point is a statement to which control may be passed other
-   --    than by falling into the statement for above. Examples are the first
-   --    statement of the body of a loop, and the statement following a label.
-   --    The form of an entry point in the ALI file is:
-
-   --      CY sloc-range
-
    --  Exit points
 
    --    An exit point is a statement that causes transfer of control. Examples
index cb5c4d1..0c761b6 100644 (file)
@@ -148,10 +148,10 @@ package body Switch is
    begin
       return Is_Switch (Switch_Chars)
         and then
-          (Switch_Chars (First .. Last) = "-param"        or else
-           Switch_Chars (First .. Last) = "dumpbase"      or else
-           Switch_Chars (First .. Last) = "auxbase-strip" or else
-           Switch_Chars (First .. Last) = "auxbase");
+          (Switch_Chars (First .. Last) = "-param"
+           or else Switch_Chars (First .. Last) = "dumpbase"
+           or else Switch_Chars (First .. Last) = "auxbase-strip"
+           or else Switch_Chars (First .. Last) = "auxbase");
    end Is_Internal_GCC_Switch;
 
    ---------------
@@ -169,15 +169,15 @@ package body Switch is
    -----------------
 
    function Switch_Last (Switch_Chars : String) return Natural is
-      Last : constant Natural := Switch_Chars'Last;
+      Last  : Natural := Switch_Chars'Last;
    begin
       if Last >= Switch_Chars'First
         and then Switch_Chars (Last) = ASCII.NUL
       then
-         return Last - 1;
-      else
-         return Last;
+         Last := Last - 1;
       end if;
+
+      return Last;
    end Switch_Last;
 
    -----------------