[Ada] Extend range type in search primitives of formal vectors
2019-08-13 Claire Dross <dross@adacore.com> gcc/ada/ * libgnat/a-cfinve.adb, libgnat/a-cofove.adb (Find_Index, Reverse_Find_Index): Use bigger type to avoid range check failure at the last loop iteration. From-SVN: r274331
This commit is contained in:
parent
b9fb922ad7
commit
dfa6d55af7
|
@ -1,3 +1,9 @@
|
||||||
|
2019-08-13 Claire Dross <dross@adacore.com>
|
||||||
|
|
||||||
|
* libgnat/a-cfinve.adb, libgnat/a-cofove.adb (Find_Index,
|
||||||
|
Reverse_Find_Index): Use bigger type to avoid range check
|
||||||
|
failure at the last loop iteration.
|
||||||
|
|
||||||
2019-08-12 Dmitriy Anisimkov <anisimko@adacore.com>
|
2019-08-12 Dmitriy Anisimkov <anisimko@adacore.com>
|
||||||
|
|
||||||
* libgnat/g-socket.adb (Is_IPv6_Address): Check that no less
|
* libgnat/g-socket.adb (Is_IPv6_Address): Check that no less
|
||||||
|
|
|
@ -457,7 +457,7 @@ is
|
||||||
Item : Element_Type;
|
Item : Element_Type;
|
||||||
Index : Index_Type := Index_Type'First) return Extended_Index
|
Index : Index_Type := Index_Type'First) return Extended_Index
|
||||||
is
|
is
|
||||||
K : Capacity_Range;
|
K : Count_Type;
|
||||||
Last : constant Index_Type := Last_Index (Container);
|
Last : constant Index_Type := Last_Index (Container);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
@ -1277,7 +1277,7 @@ is
|
||||||
Index : Index_Type := Index_Type'Last) return Extended_Index
|
Index : Index_Type := Index_Type'Last) return Extended_Index
|
||||||
is
|
is
|
||||||
Last : Index_Type'Base;
|
Last : Index_Type'Base;
|
||||||
K : Capacity_Range;
|
K : Count_Type'Base;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if Index > Last_Index (Container) then
|
if Index > Last_Index (Container) then
|
||||||
|
|
|
@ -378,7 +378,7 @@ is
|
||||||
Item : Element_Type;
|
Item : Element_Type;
|
||||||
Index : Index_Type := Index_Type'First) return Extended_Index
|
Index : Index_Type := Index_Type'First) return Extended_Index
|
||||||
is
|
is
|
||||||
K : Capacity_Range;
|
K : Count_Type;
|
||||||
Last : constant Index_Type := Last_Index (Container);
|
Last : constant Index_Type := Last_Index (Container);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
@ -1147,7 +1147,7 @@ is
|
||||||
Index : Index_Type := Index_Type'Last) return Extended_Index
|
Index : Index_Type := Index_Type'Last) return Extended_Index
|
||||||
is
|
is
|
||||||
Last : Index_Type'Base;
|
Last : Index_Type'Base;
|
||||||
K : Capacity_Range;
|
K : Count_Type'Base;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if Index > Last_Index (Container) then
|
if Index > Last_Index (Container) then
|
||||||
|
|
Loading…
Reference in New Issue