diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-11-06 11:01:03 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-11-06 11:01:03 +0100 |
commit | fb174746b279e870f087a666e5e1ea8ff8c886f7 (patch) | |
tree | 9606de64103b67697773916e577a9e5e46262aad /gcc/ada/s-bignum.adb | |
parent | 2780d17486479a152560b6173434199dcc685727 (diff) | |
download | gcc-fb174746b279e870f087a666e5e1ea8ff8c886f7.zip gcc-fb174746b279e870f087a666e5e1ea8ff8c886f7.tar.gz gcc-fb174746b279e870f087a666e5e1ea8ff8c886f7.tar.bz2 |
[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
Diffstat (limited to 'gcc/ada/s-bignum.adb')
-rw-r--r-- | gcc/ada/s-bignum.adb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/ada/s-bignum.adb b/gcc/ada/s-bignum.adb index 84e9c87..7cafbf3 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; |