From d878b2c9819e0ae9e942c87c3eb547b0bfb30dc5 Mon Sep 17 00:00:00 2001 From: Claire Dross Date: Thu, 12 Dec 2019 10:02:14 +0000 Subject: [PATCH] [Ada] Use correct subtype for call to Last in formal vectors 2019-12-12 Claire Dross gcc/ada/ * libgnat/a-cofove.adb, libgnat/a-cfinve.adb (Find_Index): Use Extended_Index for call to Last. From-SVN: r279284 --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/libgnat/a-cfinve.adb | 2 +- gcc/ada/libgnat/a-cofove.adb | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 3d0ede43d9d..99b142c1428 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2019-12-12 Claire Dross + + * libgnat/a-cofove.adb, libgnat/a-cfinve.adb (Find_Index): Use + Extended_Index for call to Last. + 2019-12-12 Gary Dismukes * sem_ch3.adb, sem_util.adb: Minor reformatting. diff --git a/gcc/ada/libgnat/a-cfinve.adb b/gcc/ada/libgnat/a-cfinve.adb index a1871280dde..b5c318b7ba1 100644 --- a/gcc/ada/libgnat/a-cfinve.adb +++ b/gcc/ada/libgnat/a-cfinve.adb @@ -458,7 +458,7 @@ is Index : Index_Type := Index_Type'First) return Extended_Index is K : Count_Type; - Last : constant Index_Type := Last_Index (Container); + Last : constant Extended_Index := Last_Index (Container); begin K := Capacity_Range (Int (Index) - Int (No_Index)); diff --git a/gcc/ada/libgnat/a-cofove.adb b/gcc/ada/libgnat/a-cofove.adb index 3a10d322874..1240a505d59 100644 --- a/gcc/ada/libgnat/a-cofove.adb +++ b/gcc/ada/libgnat/a-cofove.adb @@ -379,7 +379,7 @@ is Index : Index_Type := Index_Type'First) return Extended_Index is K : Count_Type; - Last : constant Index_Type := Last_Index (Container); + Last : constant Extended_Index := Last_Index (Container); begin K := Capacity_Range (Int (Index) - Int (No_Index)); -- 2.30.2