2
0
mirror of git://gcc.gnu.org/git/gcc.git synced 2025-04-10 02:40:28 +08:00

[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
This commit is contained in:
Arnaud Charlet 2014-01-21 08:57:53 +01:00
parent 77a2f3df91
commit 6b6041ec65
9 changed files with 55 additions and 35 deletions

@ -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.

@ -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.

@ -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;

@ -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)

@ -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,

@ -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.

@ -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;

@ -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;

@ -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