diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-01-20 16:45:51 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-01-20 16:45:51 +0100 |
commit | ff4e28eb7d01f36d8848a328d0ad7cf4b8c1d3c5 (patch) | |
tree | a59b6fd98ee1b936e9707aa626a253218922d45e /gcc | |
parent | a1efcc17b7f168c11304b7600ca7e25430ec6128 (diff) | |
download | gcc-ff4e28eb7d01f36d8848a328d0ad7cf4b8c1d3c5.zip gcc-ff4e28eb7d01f36d8848a328d0ad7cf4b8c1d3c5.tar.gz gcc-ff4e28eb7d01f36d8848a328d0ad7cf4b8c1d3c5.tar.bz2 |
[multiple changes]
2014-01-20 Arnaud Charlet <charlet@adacore.com>
* s-tataat.adb (Initialize_Attributes): Abort might already be
deferred in Create_Task.
2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
* checks.adb (Apply_Scalar_Range_Check): Flag
the exponent as requiring a range check when the expression is
an exponentiation.
From-SVN: r206831
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/ada/checks.adb | 13 | ||||
-rw-r--r-- | gcc/ada/s-tataat.adb | 6 |
3 files changed, 27 insertions, 3 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 82a8ddc..99cfe83 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,14 @@ +2014-01-20 Arnaud Charlet <charlet@adacore.com> + + * s-tataat.adb (Initialize_Attributes): Abort might already be + deferred in Create_Task. + +2014-01-20 Hristian Kirtchev <kirtchev@adacore.com> + + * checks.adb (Apply_Scalar_Range_Check): Flag + the exponent as requiring a range check when the expression is + an exponentiation. + 2014-01-20 Fedor Rybin <frybin@adacore.com> * gnat_ugn.texi: Documenting --passed-tests option for gnattest. diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb index 1e4cff8..8b8fdd8 100644 --- a/gcc/ada/checks.adb +++ b/gcc/ada/checks.adb @@ -2797,6 +2797,19 @@ package body Checks is return; end if; + -- Ensure that the exponent is a natural. The flag is set only in formal + -- verification mode as the expander takes care of this check and there + -- is no expansion phase in GNATprove_Mode. + + -- Doesn't seem right to do this unconditionally, we should check the + -- range of the exponent operand. If we do that, it seems like we should + -- then set the flag unconditionally and have the expander check the + -- flag to see whether to generate a check ??? + + if GNATprove_Mode and then Nkind (Expr) = N_Op_Expon then + Set_Do_Range_Check (Right_Opnd (Expr)); + end if; + Is_Unconstrained_Subscr_Ref := Is_Subscr_Ref and then not Is_Constrained (Arr_Typ); diff --git a/gcc/ada/s-tataat.adb b/gcc/ada/s-tataat.adb index 0b4210d..c785430 100644 --- a/gcc/ada/s-tataat.adb +++ b/gcc/ada/s-tataat.adb @@ -7,7 +7,7 @@ -- B o d y -- -- -- -- Copyright (C) 1991-1994, Florida State University -- --- Copyright (C) 1995-2010, AdaCore -- +-- Copyright (C) 1995-2013, AdaCore -- -- -- -- GNAT 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- -- @@ -186,7 +186,7 @@ package body System.Tasking.Task_Attributes is Self_Id : constant Task_Id := Self; begin - Defer_Abort (Self_Id); + Defer_Abort_Nestable (Self_Id); Lock_RTS; -- Initialize all the direct-access attributes of this task @@ -204,7 +204,7 @@ package body System.Tasking.Task_Attributes is end loop; Unlock_RTS; - Undefer_Abort (Self_Id); + Undefer_Abort_Nestable (Self_Id); exception when others => |