Commit fb174746 by Arnaud Charlet

[multiple changes]

2012-11-06  Yannick Moy  <moy@adacore.com>

	* s-bignum.adb (Div_Rem): Fix another bug in step D3.

2012-11-06  Tristan Gingold  <gingold@adacore.com>

	* s-tarest.adb (Create_Restricted_Task): Call
	Create_Restricted_Task_Sequential in sequential case.

2012-11-06  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_prag.adb (Expand_Pragma_Loop_Assertion): Do not rewrite the
	pragma into a null statement as its presence is desirable in -gnatG
	output.

From-SVN: r193219
parent 2780d174
2012-11-06 Yannick Moy <moy@adacore.com>
* s-bignum.adb (Div_Rem): Fix another bug in step D3.
2012-11-06 Tristan Gingold <gingold@adacore.com>
* s-tarest.adb (Create_Restricted_Task): Call
Create_Restricted_Task_Sequential in sequential case.
2012-11-06 Hristian Kirtchev <kirtchev@adacore.com>
* exp_prag.adb (Expand_Pragma_Loop_Assertion): Do not rewrite the
pragma into a null statement as its presence is desirable in -gnatG
output.
2012-11-06 Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb (Check_Constrained_Object): Do nothing if the
......
......@@ -1177,11 +1177,10 @@ package body Exp_Prag is
Expression => New_Reference_To (Standard_True, Loc)))));
end if;
-- The original pragma has been transformed into a complex sequence of
-- statements and does not need to remain in the tree.
-- Note: the pragma has been completely transformed into a sequence of
-- corresponding declarations and statements. We leave it in the tree
-- for documentation purposes. It will be ignored by the backend.
Rewrite (N, Make_Null_Statement (Loc));
Analyze (N);
end Expand_Pragma_Loop_Assertion;
--------------------------------
......
......@@ -859,6 +859,8 @@ package body System.Bignums is
-- This had a bug not discovered till 1995, see Vol 2 errata:
-- http://www-cs-faculty.stanford.edu/~uno/err2-2e.ps.gz. Under
-- rare circumstances the expression in the test could overflow.
-- This version was further corrected in 2005, see Vol 2 errata:
-- http://www-cs-faculty.stanford.edu/~uno/all2-pre.ps.gz.
-- The code below is the fixed version of this step.
-- D3. [Calculate qhat.] Set qhat to (uj,uj+1)/v1 and rhat to
......@@ -868,13 +870,13 @@ package body System.Bignums is
qhat := temp / DD (v1);
rhat := temp mod DD (v1);
-- D3 (continued). Now test if qhat = b or v2*qhat > (rhat,uj+2):
-- D3 (continued). Now test if qhat >= b or v2*qhat > (rhat,uj+2):
-- if so, decrease qhat by 1, increase rhat by v1, and repeat this
-- test if rhat < b. [The test on v2 determines at at high speed
-- most of the cases in which the trial value qhat is one too
-- large, and eliminates all cases where qhat is two too large.]
while qhat = b
while qhat >= b
or else DD (v2) * qhat > LSD (rhat) & u (j + 2)
loop
qhat := qhat - 1;
......
......@@ -621,21 +621,24 @@ package body System.Tasking.Restricted.Stages is
Created_Task : Task_Id)
is
begin
Create_Restricted_Task
(Priority, Stack_Address, Size, Task_Info, CPU, State,
Discriminants, Elaborated, Task_Image, Created_Task);
-- Append this task to the activation chain
if Partition_Elaboration_Policy = 'S' then
-- In fact the elaboration policy is sequential, add this task to
-- the global activation chain to defer its activation.
-- A unit may have been compiled without partition elaboration
-- policy, and in this case the compiler will emit calls for the
-- default policy (concurrent). But if the partition policy is
-- sequential, activation must be deferred.
Created_Task.Common.Activation_Link := Tasks_Activation_Chain;
Tasks_Activation_Chain := Created_Task;
Create_Restricted_Task_Sequential
(Priority, Stack_Address, Size, Task_Info, CPU, State,
Discriminants, Elaborated, Task_Image, Created_Task);
else
Create_Restricted_Task
(Priority, Stack_Address, Size, Task_Info, CPU, State,
Discriminants, Elaborated, Task_Image, Created_Task);
-- Append this task to the activation chain
Created_Task.Common.Activation_Link := Chain.T_ID;
Chain.T_ID := Created_Task;
end if;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment