aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2012-11-06 11:01:03 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2012-11-06 11:01:03 +0100
commitfb174746b279e870f087a666e5e1ea8ff8c886f7 (patch)
tree9606de64103b67697773916e577a9e5e46262aad /gcc
parent2780d17486479a152560b6173434199dcc685727 (diff)
downloadgcc-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')
-rw-r--r--gcc/ada/ChangeLog15
-rw-r--r--gcc/ada/exp_prag.adb7
-rw-r--r--gcc/ada/s-bignum.adb6
-rw-r--r--gcc/ada/s-tarest.adb23
4 files changed, 35 insertions, 16 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index b1099c3..57b91bd 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,18 @@
+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
diff --git a/gcc/ada/exp_prag.adb b/gcc/ada/exp_prag.adb
index 5ce9097..c41cc81 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 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;
diff --git a/gcc/ada/s-tarest.adb b/gcc/ada/s-tarest.adb
index e2a75e0..c765cc0 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;