aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch4.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-08-03 09:45:36 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-03 09:45:36 +0200
commitabcd9db2c8326a00f5d08d7ce08a382eb9b17120 (patch)
tree5d30ddc00e27133f5b6801cc2042c13d19214134 /gcc/ada/exp_ch4.adb
parentb474d6c3f1ea034da14d20a52f183e4a1a0e7b87 (diff)
downloadgcc-abcd9db2c8326a00f5d08d7ce08a382eb9b17120.zip
gcc-abcd9db2c8326a00f5d08d7ce08a382eb9b17120.tar.gz
gcc-abcd9db2c8326a00f5d08d7ce08a382eb9b17120.tar.bz2
[multiple changes]
2011-08-03 Robert Dewar <dewar@adacore.com> * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where comparison operand is variable, and turns out to be zero or negative. 2011-08-03 Javier Miranda <miranda@adacore.com> * exp_intr.adb (Expand_Dispatching_Constructor_Call): Disable expansion of code required for native targets. Done to avoid generating references to unavailable runtime entities in VM targets. * exp_ch3.adb (Expand_N_Object_Declaration): Add missing support to handle the explicit initialization of class-wide interface objects. Fix documentation. 2011-08-03 Matthew Heaney <heaney@adacore.com> * a-cobove.adb (Merge): Move source onto target, instead of using Assign 2011-08-03 Matthew Heaney <heaney@adacore.com> * a-cbdlli.adb (Splice): move source items from first to last 2011-08-03 Yannick Moy <moy@adacore.com> * sem_util.ads: comment added. 2011-08-03 Javier Miranda <miranda@adacore.com> * exp_aggr.adb (Expand_Record_Aggregate): In VM targets disable the expansion into assignments of aggregates whose type is not known at compile time. From-SVN: r177233
Diffstat (limited to 'gcc/ada/exp_ch4.adb')
-rw-r--r--gcc/ada/exp_ch4.adb16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index abaf676..0298487 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -10209,11 +10209,11 @@ package body Exp_Ch4 is
-- Kind of comparison operator, gets flipped if operands backwards
function Is_Optimizable (N : Node_Id) return Boolean;
- -- Tests N to see if it is an optimizable comparison value (defined
- -- as constant zero or one, or something else where the value is known
- -- to be in range of 32-bits, and where the corresponding Length value
- -- is also known to be 32-bits. If result is true, sets Is_Zero, Ityp,
- -- and Comp accordingly.
+ -- Tests N to see if it is an optimizable comparison value (defined as
+ -- constant zero or one, or something else where the value is known to
+ -- be positive and in the range of 32-bits, and where the corresponding
+ -- Length value is also known to be 32-bits. If result is true, sets
+ -- Is_Zero, Ityp, and Comp accordingly.
function Is_Entity_Length (N : Node_Id) return Boolean;
-- Tests if N is a length attribute applied to a simple entity. If so,
@@ -10293,14 +10293,14 @@ package body Exp_Ch4 is
Determine_Range (N, OK, Lo, Hi, Assume_Valid => True);
if not OK
- or else Lo < UI_From_Int (Int'First)
+ or else Lo < Uint_1
or else Hi > UI_From_Int (Int'Last)
then
return False;
end if;
- -- Comparison value was within 32-bits, so now we must check the
- -- index value to make sure it is also within 32-bits.
+ -- Comparison value was within range, so now we must check the index
+ -- value to make sure it is also within 32-bits.
Indx := First_Index (Etype (Ent));