From: Arnaud Charlet Date: Tue, 6 Nov 2012 10:01:03 +0000 (+0100) Subject: [multiple changes] X-Git-Tag: releases/gcc-4.8.0~2235 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fb174746b279e870f087a666e5e1ea8ff8c886f7;p=thirdparty%2Fgcc.git [multiple changes] 2012-11-06 Yannick Moy * s-bignum.adb (Div_Rem): Fix another bug in step D3. 2012-11-06 Tristan Gingold * s-tarest.adb (Create_Restricted_Task): Call Create_Restricted_Task_Sequential in sequential case. 2012-11-06 Hristian Kirtchev * 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 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index b1099c3fb0f1..57b91bdb9ba2 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,18 @@ +2012-11-06 Yannick Moy + + * s-bignum.adb (Div_Rem): Fix another bug in step D3. + +2012-11-06 Tristan Gingold + + * s-tarest.adb (Create_Restricted_Task): Call + Create_Restricted_Task_Sequential in sequential case. + +2012-11-06 Hristian Kirtchev + + * 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 * sem_ch8.adb (Check_Constrained_Object): Do nothing if the diff --git a/gcc/ada/exp_prag.adb b/gcc/ada/exp_prag.adb index 5ce909747684..c41cc815cb52 100644 --- a/gcc/ada/exp_prag.adb +++ b/gcc/ada/exp_prag.adb @@ -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; -------------------------------- diff --git a/gcc/ada/s-bignum.adb b/gcc/ada/s-bignum.adb index 84e9c8795d74..7cafbf3d5ae7 100644 --- a/gcc/ada/s-bignum.adb +++ b/gcc/ada/s-bignum.adb @@ -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; diff --git a/gcc/ada/s-tarest.adb b/gcc/ada/s-tarest.adb index e2a75e0c04c6..c765cc0789dc 100644 --- a/gcc/ada/s-tarest.adb +++ b/gcc/ada/s-tarest.adb @@ -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;