diff options
author | Claire Dross <dross@adacore.com> | 2019-12-12 10:02:14 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2019-12-12 10:02:14 +0000 |
commit | d878b2c9819e0ae9e942c87c3eb547b0bfb30dc5 (patch) | |
tree | f92595c1c7947d824011207b249bc149e785d22a /gcc | |
parent | e16c6cc3319d1ee613a9c53b86d2e7addd07b13c (diff) | |
download | gcc-d878b2c9819e0ae9e942c87c3eb547b0bfb30dc5.zip gcc-d878b2c9819e0ae9e942c87c3eb547b0bfb30dc5.tar.gz gcc-d878b2c9819e0ae9e942c87c3eb547b0bfb30dc5.tar.bz2 |
[Ada] Use correct subtype for call to Last in formal vectors
2019-12-12 Claire Dross <dross@adacore.com>
gcc/ada/
* libgnat/a-cofove.adb, libgnat/a-cfinve.adb (Find_Index): Use
Extended_Index for call to Last.
From-SVN: r279284
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/libgnat/a-cfinve.adb | 2 | ||||
-rw-r--r-- | 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 3d0ede4..99b142c 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2019-12-12 Claire Dross <dross@adacore.com> + + * libgnat/a-cofove.adb, libgnat/a-cfinve.adb (Find_Index): Use + Extended_Index for call to Last. + 2019-12-12 Gary Dismukes <dismukes@adacore.com> * 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 a187128..b5c318b 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 3a10d32..1240a50 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)); |