aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/nlists.adb
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2007-08-14 10:37:26 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2007-08-14 10:37:26 +0200
commitd766cee3c3df3a0a6f5893f7f262dc10d150c85e (patch)
tree7c3895b13822ab5f7e3c1e9da39c7366611502b5 /gcc/ada/nlists.adb
parent939c12d26a67c4e4d42d106d31c8f821b68cb1fb (diff)
downloadgcc-d766cee3c3df3a0a6f5893f7f262dc10d150c85e.zip
gcc-d766cee3c3df3a0a6f5893f7f262dc10d150c85e.tar.gz
gcc-d766cee3c3df3a0a6f5893f7f262dc10d150c85e.tar.bz2
a-stzsup.adb, [...]: Fix warnings for range tests optimized out.
2007-08-14 Robert Dewar <dewar@adacore.com> Gary Dismukes <dismukes@adacore.com> Ed Schonberg <schonberg@adacore.com> Thomas Quinot <quinot@adacore.com> * a-stzsup.adb, nlists.adb, lib-util.adb, treepr.adb, a-stwisu.adb, a-strsup.adb: Fix warnings for range tests optimized out. * exp_ch4.adb (Expand_N_In): Add warnings for range tests optimized out. (Get_Allocator_Final_List): For the case of an anonymous access type that has a specified Associated_Final_Chain, do not go up to the enclosing scope. (Expand_N_Type_Conversion): Test for the case of renamings of access parameters when deciding whether to apply a run-time accessibility check. (Convert_Aggr_In_Allocator): Use Insert_Actions to place expanded aggregate code before allocator, and ahead of declaration for temporary, to prevent access before elaboration when the allocator is an actual for an access parameter. (Expand_N_Type_Conversion): On an access type conversion involving an access parameter, do not apply an accessibility check when the operand's original node was an attribute other than 'Access. We now create access conversions for the expansion of 'Unchecked_Access and 'Unrestricted_Access in certain cases and clearly accessibility should not be checked for those. * exp_ch6.ads, exp_ch6.adb (Add_Call_By_Copy_Code): For an actual that includes a type conversion of a packed component that has been expanded, recover the original expression for the object, and use this expression in the post-call assignment statement, so that the assignment is made to the object and not to a back-end temporary. (Freeze_Subprogram): In case of primitives of tagged types not defined at the library level force generation of code to register the primitive in the dispatch table. In addition some code reorganization has been done to leave the implementation clear. (Expand_Call): When expanding an inherited implicit conversion, preserve the type of the inherited function after the intrinsic operation has been expanded. * exp_ch2.ads, exp_ch2.adb (Expand_Entry_Parameter.In_Assignment_Context): An implicit dereference of an entry formal appearing in an assignment statement does not assign to the formal. (Expand_Current_Value): Instead of calling a routine to determine whether the prefix of an attribute reference should be optimized or not, prevent the optimization of such prefixes all together. * lib-xref.adb (Generate_Reference.Is_On_LHS): An indexed or selected component whose prefix is known to be of an access type is an implicit dereference and does not assign to the prefix. From-SVN: r127411
Diffstat (limited to 'gcc/ada/nlists.adb')
-rw-r--r--gcc/ada/nlists.adb8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/ada/nlists.adb b/gcc/ada/nlists.adb
index 8778a9e..0745f38 100644
--- a/gcc/ada/nlists.adb
+++ b/gcc/ada/nlists.adb
@@ -304,7 +304,7 @@ package body Nlists is
if List = No_List then
return Empty;
else
- pragma Assert (List in First_List_Id .. Lists.Last);
+ pragma Assert (List <= Lists.Last);
return Lists.Table (List).First;
end if;
end First;
@@ -630,7 +630,7 @@ package body Nlists is
function Last (List : List_Id) return Node_Id is
begin
- pragma Assert (List in First_List_Id .. Lists.Last);
+ pragma Assert (List <= Lists.Last);
return Lists.Table (List).Last;
end Last;
@@ -1028,7 +1028,7 @@ package body Nlists is
function Parent (List : List_Id) return Node_Id is
begin
- pragma Assert (List in First_List_Id .. Lists.Last);
+ pragma Assert (List <= Lists.Last);
return Lists.Table (List).Parent;
end Parent;
@@ -1355,7 +1355,7 @@ package body Nlists is
procedure Set_Parent (List : List_Id; Node : Node_Id) is
begin
- pragma Assert (List in First_List_Id .. Lists.Last);
+ pragma Assert (List <= Lists.Last);
Lists.Table (List).Parent := Node;
end Set_Parent;