Files
gcc-reflection/gcc/testsuite/gnat.dg/encode_string1_pkg.ads
Eric Botcazou 52860cc145 [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.

From-SVN: r273674
2019-07-22 13:56:55 +00:00

7 lines
165 B
Ada

generic
type C is private;
type S is array (Positive range <>) of C;
with function Encode (Val : S) return String;
procedure Encode_String1_Pkg (Val : S);