aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-01-21 08:57:53 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2014-01-21 08:57:53 +0100
commit6b6041ec651c69871cc4c8d0ba3621c575b97e75 (patch)
tree695e62bceda250d6591337f5ed5f9898a0e29048
parent77a2f3df910f3b32cb0cbc3b6967c229d5680272 (diff)
downloadgcc-6b6041ec651c69871cc4c8d0ba3621c575b97e75.zip
gcc-6b6041ec651c69871cc4c8d0ba3621c575b97e75.tar.gz
gcc-6b6041ec651c69871cc4c8d0ba3621c575b97e75.tar.bz2
[multiple changes]
2014-01-21 Arnaud Charlet <charlet@adacore.com> * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add call to Abort_Undefer, as expected by the runtime. * s-tasren.adb (Local_Complete_Rendezvous): Replace Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be deferred at this point. Update comments. 2014-01-21 Thomas Quinot <quinot@adacore.com> * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting. 2014-01-21 Arnaud Charlet <charlet@adacore.com> * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal, remove from doc. From-SVN: r206873
-rw-r--r--gcc/ada/ChangeLog17
-rw-r--r--gcc/ada/checks.adb6
-rw-r--r--gcc/ada/exp_ch4.adb5
-rw-r--r--gcc/ada/exp_ch5.adb10
-rw-r--r--gcc/ada/exp_ch9.adb18
-rw-r--r--gcc/ada/gnat_ugn.texi6
-rw-r--r--gcc/ada/s-tasren.adb13
-rw-r--r--gcc/ada/switch-c.adb10
-rw-r--r--gcc/ada/usage.adb5
9 files changed, 55 insertions, 35 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 5b426fc..3feaf38 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,20 @@
+2014-01-21 Arnaud Charlet <charlet@adacore.com>
+
+ * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
+ call to Abort_Undefer, as expected by the runtime.
+ * s-tasren.adb (Local_Complete_Rendezvous): Replace
+ Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
+ deferred at this point. Update comments.
+
+2014-01-21 Thomas Quinot <quinot@adacore.com>
+
+ * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
+
+2014-01-21 Arnaud Charlet <charlet@adacore.com>
+
+ * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
+ remove from doc.
+
2014-01-21 Robert Dewar <dewar@adacore.com>
* switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb
index 496c3a2..f496055 100644
--- a/gcc/ada/checks.adb
+++ b/gcc/ada/checks.adb
@@ -1508,7 +1508,7 @@ package body Checks is
return;
end if;
- -- Suppress checks if the subtypes are the same. the check must be
+ -- Suppress checks if the subtypes are the same. The check must be
-- preserved in an assignment to a formal, because the constraint is
-- given by the actual.
@@ -1552,7 +1552,7 @@ package body Checks is
-- the constraints are constants. In this case, we can do the check
-- successfully at compile time.
- -- We skip this check for the case where the node is rewritten`as
+ -- We skip this check for the case where the node is rewritten as
-- an allocator, because it already carries the context subtype,
-- and extracting the discriminants from the aggregate is messy.
@@ -1569,7 +1569,7 @@ package body Checks is
begin
-- S_Typ may not have discriminants in the case where it is a
-- private type completed by a default discriminated type. In that
- -- case, we need to get the constraints from the underlying_type.
+ -- case, we need to get the constraints from the underlying type.
-- If the underlying type is unconstrained (i.e. has no default
-- discriminants) no check is needed.
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index 7d1ec81..aa39586 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -958,7 +958,7 @@ package body Exp_Ch4 is
-- [Deep_]Adjust (Temp.all);
-- We analyze by hand the new internal allocator to avoid any
- -- recursion and inappropriate call to Initialize
+ -- recursion and inappropriate call to Initialize.
-- We don't want to remove side effects when the expression must be
-- built in place. In the case of a build-in-place function call,
@@ -1046,8 +1046,7 @@ package body Exp_Ch4 is
then
Insert_Action (N,
Make_Attach_Call (
- Obj_Ref =>
- New_Reference_To (Temp, Loc),
+ Obj_Ref => New_Reference_To (Temp, Loc),
Ptr_Typ => PtrT));
end if;
diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb
index 1fb6dc7..b71117bd 100644
--- a/gcc/ada/exp_ch5.adb
+++ b/gcc/ada/exp_ch5.adb
@@ -1847,11 +1847,11 @@ package body Exp_Ch5 is
Set_Etype (Lhs, Lt);
end;
- -- If the Lhs has a private type with unknown discriminants, it
- -- may have a full view with discriminants, but those are nameable
- -- only in the underlying type, so convert the Rhs to it before
- -- potential checking. Convert Lhs as well, otherwise the actual
- -- subtype might not be constructible.
+ -- If the Lhs has a private type with unknown discriminants, it may
+ -- have a full view with discriminants, but those are nameable only
+ -- in the underlying type, so convert the Rhs to it before potential
+ -- checking. Convert Lhs as well, otherwise the actual subtype might
+ -- not be constructible.
elsif Has_Unknown_Discriminants (Base_Type (Etype (Lhs)))
and then Has_Discriminants (Typ)
diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb
index 7523542..4fce378 100644
--- a/gcc/ada/exp_ch9.adb
+++ b/gcc/ada/exp_ch9.adb
@@ -10339,13 +10339,17 @@ package body Exp_Ch9 is
if Present (Handled_Statement_Sequence (Accept_Statement (Alt))) then
Null_Body := New_Reference_To (Standard_False, Eloc);
- if Abort_Allowed then
- Call := Make_Procedure_Call_Statement (Eloc,
- Name => New_Reference_To (RTE (RE_Abort_Undefer), Eloc));
- Insert_Before (First (Statements (Handled_Statement_Sequence (
- Accept_Statement (Alt)))), Call);
- Analyze (Call);
- end if;
+ -- Always add call to Abort_Undefer, since this is what the
+ -- runtime expects (abort deferred in Selective_Wait).
+
+ Call :=
+ Make_Procedure_Call_Statement (Eloc,
+ Name => New_Reference_To (RTE (RE_Abort_Undefer), Eloc));
+ Insert_Before
+ (First (Statements (Handled_Statement_Sequence
+ (Accept_Statement (Alt)))),
+ Call);
+ Analyze (Call);
PB_Ent :=
Make_Defining_Identifier (Eloc,
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index 5e519fd..c17ca38 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -3821,12 +3821,6 @@ these errors become warnings (which can be ignored, or suppressed in the usual
manner). This can be useful in some specialized circumstances such as the
temporary use of special test software.
-@item -gnates=@var{path}
-@cindex @option{-gnates=file} (@command{gcc})
-Only relevant to the SPARK toolset (gnat2why), where gnatprove passes
-extra switches via a response file to gnat2why via this switch.
-This switch is otherwise ignored by gcc.
-
@item -gnateS
@cindex @option{-gnateS} (@command{gcc})
Synonym of @option{-fdump-scos}, kept for backwards compatibility.
diff --git a/gcc/ada/s-tasren.adb b/gcc/ada/s-tasren.adb
index 16873e8..244f9e3 100644
--- a/gcc/ada/s-tasren.adb
+++ b/gcc/ada/s-tasren.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
-- --
-- GNARL 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- --
@@ -565,13 +565,13 @@ package body System.Tasking.Rendezvous is
Send_Trace_Info (M_RDV_Complete, Entry_Call.Self);
end if;
- Initialization.Defer_Abort_Nestable (Self_Id);
+ Initialization.Defer_Abort (Self_Id);
elsif ZCX_By_Default then
-- With ZCX, aborts are not automatically deferred in handlers
- Initialization.Defer_Abort_Nestable (Self_Id);
+ Initialization.Defer_Abort (Self_Id);
end if;
-- We need to clean up any accepts which Self may have been serving when
@@ -837,7 +837,8 @@ package body System.Tasking.Rendezvous is
Uninterpreted_Data := Self_Id.Common.Call.Uninterpreted_Data;
-- In this case the accept body is not Null_Body. Defer abort
- -- until it gets into the accept body.
+ -- until it gets into the accept body. The compiler has inserted
+ -- a call to Abort_Undefer as part of the entry expansion.
pragma Assert (Self_Id.Deferral_Level = 1);
@@ -899,6 +900,8 @@ package body System.Tasking.Rendezvous is
Initialization.Defer_Abort_Nestable (Self_Id);
-- Leave abort deferred until the accept body
+ -- The compiler has inserted a call to Abort_Undefer as part of
+ -- the entry expansion.
end if;
STPO.Unlock (Self_Id);
@@ -970,6 +973,8 @@ package body System.Tasking.Rendezvous is
-- We need an extra defer here, to keep abort
-- deferred until we get into the accept body
+ -- The compiler has inserted a call to Abort_Undefer as part
+ -- of the entry expansion.
Initialization.Defer_Abort_Nestable (Self_Id);
end if;
diff --git a/gcc/ada/switch-c.adb b/gcc/ada/switch-c.adb
index 684f62f..3043dde 100644
--- a/gcc/ada/switch-c.adb
+++ b/gcc/ada/switch-c.adb
@@ -660,10 +660,9 @@ package body Switch.C is
when 'P' =>
Treat_Categorization_Errors_As_Warnings := True;
- -- -gnateS (generate SCO information)
+ -- -gnates=file (specify extra file switches for gnat2why)
- -- Include Source Coverage Obligation information in ALI
- -- files for use by source coverage analysis tools (xcov).
+ -- This is an internal switch
when 's' =>
if not First_Switch then
@@ -684,6 +683,11 @@ package body Switch.C is
return;
+ -- -gnateS (generate SCO information)
+
+ -- Include Source Coverage Obligation information in ALI
+ -- files for use by source coverage analysis tools (xcov).
+
when 'S' =>
Generate_SCO := True;
Generate_SCO_Instance_Table := True;
diff --git a/gcc/ada/usage.adb b/gcc/ada/usage.adb
index 15215a3..4f68440 100644
--- a/gcc/ada/usage.adb
+++ b/gcc/ada/usage.adb
@@ -236,10 +236,7 @@ begin
Write_Switch_Char ("eP");
Write_Line ("Pure/Prelaborate errors generate warnings rather than errors");
- -- Line for -gnates switch
-
- Write_Switch_Char ("es=?");
- Write_Line ("Specify extra switches for gnat2why");
+ -- No line for -gnates=? : internal switch
-- Line for -gnateS switch