aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2012-07-23 10:32:33 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2012-07-23 10:32:33 +0200
commitc4250ab16bc898d9995a804afa2bcf9523f0cd83 (patch)
treea445be755ef56a77e82320063c6bd730ba5cc5d7 /gcc
parentd7a44b14423c7751db39957227377d5909fde72e (diff)
downloadgcc-c4250ab16bc898d9995a804afa2bcf9523f0cd83.zip
gcc-c4250ab16bc898d9995a804afa2bcf9523f0cd83.tar.gz
gcc-c4250ab16bc898d9995a804afa2bcf9523f0cd83.tar.bz2
[multiple changes]
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog19
-rw-r--r--gcc/ada/exp_ch3.adb2
-rw-r--r--gcc/ada/exp_ch5.adb14
-rw-r--r--gcc/ada/exp_ch7.adb2
-rw-r--r--gcc/ada/exp_ch9.adb10
-rw-r--r--gcc/ada/freeze.adb4
-rw-r--r--gcc/ada/s-tasinf-linux.ads4
-rw-r--r--gcc/ada/switch-m.adb2
8 files changed, 43 insertions, 14 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index a25e8e1..8846000 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -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
diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb
index 91c8833..066b37d 100644
--- a/gcc/ada/exp_ch3.adb
+++ b/gcc/ada/exp_ch3.adb
@@ -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
diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb
index 43a1c75..a1aaa37 100644
--- a/gcc/ada/exp_ch5.adb
+++ b/gcc/ada/exp_ch5.adb
@@ -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;
diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb
index 6483c7e..17ad11c 100644
--- a/gcc/ada/exp_ch7.adb
+++ b/gcc/ada/exp_ch7.adb
@@ -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
diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb
index c8a3094..a8bca19 100644
--- a/gcc/ada/exp_ch9.adb
+++ b/gcc/ada/exp_ch9.adb
@@ -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;
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
index a65f0b1..1485643 100644
--- a/gcc/ada/freeze.adb
+++ b/gcc/ada/freeze.adb
@@ -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???
diff --git a/gcc/ada/s-tasinf-linux.ads b/gcc/ada/s-tasinf-linux.ads
index db274f8..b789dd1 100644
--- a/gcc/ada/s-tasinf-linux.ads
+++ b/gcc/ada/s-tasinf-linux.ads
@@ -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.
diff --git a/gcc/ada/switch-m.adb b/gcc/ada/switch-m.adb
index 81211db0..d082c90 100644
--- a/gcc/ada/switch-m.adb
+++ b/gcc/ada/switch-m.adb
@@ -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;