]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Mon, 23 Jul 2012 08:32:33 +0000 (10:32 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Mon, 23 Jul 2012 08:32:33 +0000 (10:32 +0200)
2012-07-23  Arnaud Charlet  <charlet@adacore.com>

* s-tasinf-linux.ads: Fix typo.

2012-07-23  Thomas Quinot  <quinot@adacore.com>

* exp_ch7.adb, switch-m.adb, exp_ch3.adb, freeze.adb: Minor reformatting

2012-07-23  Ed Schonberg  <schonberg@adacore.com>

* exp_ch5.adb (Expand_Iterator_Loop_Over_Array): If original
loop carries an identifier, preserve it when rewriting it as a
standard loop to validate exit statements that may reference
that name in the body of the loop.

2012-07-23  Thomas Quinot  <quinot@adacore.com>

* exp_ch9.adb: Minor code cleanup.

From-SVN: r189776

gcc/ada/ChangeLog
gcc/ada/exp_ch3.adb
gcc/ada/exp_ch5.adb
gcc/ada/exp_ch7.adb
gcc/ada/exp_ch9.adb
gcc/ada/freeze.adb
gcc/ada/s-tasinf-linux.ads
gcc/ada/switch-m.adb

index a25e8e1550542dfe1ffdc03bb8291782f7549ce9..8846000716946609b2f083d32142a1af493cef53 100644 (file)
@@ -1,3 +1,22 @@
+2012-07-23  Arnaud Charlet  <charlet@adacore.com>
+
+       * s-tasinf-linux.ads: Fix typo.
+
+2012-07-23  Thomas Quinot  <quinot@adacore.com>
+
+       * exp_ch7.adb, switch-m.adb, exp_ch3.adb, freeze.adb: Minor reformatting
+
+2012-07-23  Ed Schonberg  <schonberg@adacore.com>
+
+       * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): If original
+       loop carries an identifier, preserve it when rewriting it as a
+       standard loop to validate exit statements that may reference
+       that name in the body of the loop.
+
+2012-07-23  Thomas Quinot  <quinot@adacore.com>
+
+       * exp_ch9.adb: Minor code cleanup.
+
 2012-07-23  Ed Schonberg  <schonberg@adacore.com>
 
        * sem_ch4.adb (Analyze_Selected_Component): When checking for
index 91c883322abe0b1b5d500310578f237fce73aa3c..066b37d1775940ce33116eba4fbe7e7b210f10f8 100644 (file)
@@ -635,7 +635,7 @@ package body Exp_Ch3 is
       --  but it properly belongs with the array type declaration. However, if
       --  the freeze node is for a subtype of a type declared in another unit
       --  it seems preferable to use the freeze node as the source location of
-      --  of the init.proc. In any case this is preferable for gcov usage, and
+      --  of the init proc. In any case this is preferable for gcov usage, and
       --  the Sloc is not otherwise used by the compiler.
 
       if In_Open_Scopes (Scope (A_Type)) then
index 43a1c75cdbee2914ccdb2899ca5ae76f5c470535..a1aaa37363e2ab3150517d2db15a1ff03bbf153f 100644 (file)
@@ -3204,6 +3204,13 @@ package body Exp_Ch5 is
              Statements => Stats,
              End_Label  => Empty);
 
+         --  If present, preserve identifier of loop, which can be used in
+         --  an exit statement in the body.
+
+         if Present (Identifier (N)) then
+            Set_Identifier (New_Loop, Relocate_Node (Identifier (N)));
+         end if;
+
          --  Create the declarations for Iterator and cursor and insert them
          --  before the source loop. Given that the domain of iteration is
          --  already an entity, the iterator is just a renaming of that
@@ -3380,6 +3387,13 @@ package body Exp_Ch5 is
          end loop;
       end if;
 
+      --  If original loop has a name, preserve it so it can be recognized by
+      --  an exit statement in the body of the rewritten loop.
+
+      if Present (Identifier (N)) then
+         Set_Identifier (Core_Loop, Relocate_Node (Identifier (N)));
+      end if;
+
       Rewrite (N, Core_Loop);
       Analyze (N);
    end Expand_Iterator_Loop_Over_Array;
index 6483c7e339d67e4bba298af741a7462ea1e433a1..17ad11cc1731ff0b49a4e01e2212d34d80bf20b2 100644 (file)
@@ -4565,7 +4565,7 @@ package body Exp_Ch7 is
                          Build_Exception_Handler (Fin_Data))));
 
                --  The single raise statement must be inserted after all the
-               --  finalization blocks. And we put everything into a wrapper
+               --  finalization blocks, and we put everything into a wrapper
                --  block to clearly expose the construct to the back-end.
 
                if Present (Prev_Fin) then
index c8a3094c3209d2171c85330c5513fbcadd33859c..a8bca192a82d62116074af71a8f9c3b352372476 100644 (file)
@@ -10307,12 +10307,10 @@ package body Exp_Ch9 is
          Proc  : Node_Id)
       is
          Astmt     : constant Node_Id := Accept_Statement (Alt);
-         Choices   : List_Id;
          Alt_Stats : List_Id;
 
       begin
          Adjust_Condition (Condition (Alt));
-         Choices := New_List (Make_Integer_Literal (Loc, Index));
 
          --  Accept with body
 
@@ -10354,7 +10352,7 @@ package body Exp_Ch9 is
 
          Append_To (Alt_List,
            Make_Case_Statement_Alternative (Loc,
-             Discrete_Choices => Choices,
+             Discrete_Choices => New_List (Make_Integer_Literal (Loc, Index)),
              Statements       => Alt_Stats));
       end Process_Accept_Alternative;
 
@@ -10364,7 +10362,6 @@ package body Exp_Ch9 is
 
       procedure Process_Delay_Alternative (Alt : Node_Id; Index : Int) is
          Dloc      : constant Source_Ptr := Sloc (Delay_Statement (Alt));
-         Choices   : List_Id;
          Cond      : Node_Id;
          Delay_Alt : List_Id;
 
@@ -10478,11 +10475,10 @@ package body Exp_Ch9 is
                Append_List (Statements (Alt), Delay_Alt_List);
 
             else
-               Choices := New_List (Make_Integer_Literal (Loc, Index));
-
                Append_To (Delay_Alt_List,
                  Make_Case_Statement_Alternative (Loc,
-                   Discrete_Choices => Choices,
+                   Discrete_Choices => New_List (
+                                         Make_Integer_Literal (Loc, Index)),
                    Statements       => Statements (Alt)));
             end if;
 
index a65f0b17e19d83d3e006494dd06d1f4ebe2f531a..14856432ca96ce91537c49e469838f7dd69d7f4f 100644 (file)
@@ -3027,9 +3027,9 @@ package body Freeze is
                   end if;
                end;
 
-               --  Pre/Post conditions are implemented through a subprogram in
+               --  Pre/post conditions are implemented through a subprogram in
                --  the corresponding body, and therefore are not checked on an
-               --  imported subprogram for which the body is not available.
+               --  imported subprogram, for which the body is not available.
 
                --  Could consider generating a wrapper to take care of this???
 
index db274f89f525ae371ec27eb31fef693683d2476a..b789dd1cf602e7495fadee09ce95c447f4ade9b2 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---            Copyright (C) 2007-2009, Free Software Foundation, Inc.       --
+--            Copyright (C) 2007-2012, 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- --
@@ -48,7 +48,7 @@ package System.Task_Info is
    pragma Elaborate_Body;
    --  To ensure that a body is allowed
 
-   --  Windows provides a way to define the ideal processor to use for a given
+   --  Linux provides a way to define the ideal processor to use for a given
    --  thread. The ideal processor is not necessarily the one that will be used
    --  by the OS but the OS will always try to schedule this thread to the
    --  specified processor if it is available.
index 81211db0f3c0492824715c29d7ff4bab567a39f6..d082c905f866bad7924726b9e5ad8ad52edc8f54 100644 (file)
@@ -423,7 +423,7 @@ package body Switch.M is
                         return;
                      end if;
 
-                  --  -gnatn may be -gnatn, -gnatn1 or -gnat2
+                  --  -gnatn may be -gnatn, -gnatn1, or -gnatn2
 
                   when 'n' =>
                      Last_Stored := First_Stored;