[Ada] Slice length computation bug in Generic_Bounded_Length generics
authorSteve Baird <baird@adacore.com>
Mon, 15 Aug 2022 23:58:36 +0000 (16:58 -0700)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 6 Sep 2022 07:14:22 +0000 (09:14 +0200)
commitc889b2e8acc706b2c9fe6559c0094ce7785c3583
treee2d75076bd066e5e6ca6244b16f62207ce5e4257
parent2aef4695708f807f44ff531f0c489907f92e05ad
[Ada] Slice length computation bug in Generic_Bounded_Length generics

In some cases involving null slices, the Slice subprograms (both the
  function and the procedure) in each of the three Generic_Bounded_Length
  generic packages (for String, Wide_String, and Wide_Wide_String)
  could raise Constraint_Error in cases where this is incorrect.

gcc/ada/

* libgnat/a-strsup.adb, libgnat/a-stwisu.adb, libgnat/a-stzsup.adb
(Super_Slice function and procedure): fix slice length computation.
gcc/ada/libgnat/a-strsup.adb
gcc/ada/libgnat/a-stwisu.adb
gcc/ada/libgnat/a-stzsup.adb