[Ada] Fix wrong assumption on bounds in GNAT.Encode_String
This fixes a couple of oversights in the GNAT.Encode_String package,
whose effect is to assume that all the strings have a lower bound of 1.
2019-07-22 Eric Botcazou <ebotcazou@adacore.com>
gcc/ada/
* libgnat/g-encstr.adb (Encode_Wide_String): Fix oversight.
(Encode_Wide_Wide_String): Likewise.
gcc/testsuite/
* gnat.dg/encode_string1.adb, gnat.dg/encode_string1_pkg.adb,
gnat.dg/encode_string1_pkg.ads: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@273674
138bc75d-0d04-0410-961f-
82ee72b054a4