[Ada] Segmentation_Fault with Integer'Wide_Wide_Value
authorHristian Kirtchev <kirtchev@adacore.com>
Mon, 16 Jul 2018 14:10:58 +0000 (14:10 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 16 Jul 2018 14:10:58 +0000 (14:10 +0000)
commit3c820aca5548d850811e41f7aa85f4a7fb10d6ed
treef5a98a5b17dc2d48840fb981d2493311ba019685
parent2588c36c2ea1f62176b07268fa7a8e0cedeb4fbf
[Ada] Segmentation_Fault with Integer'Wide_Wide_Value

This patch updates the routines which produce Wide_String and Wide_Wide_String
from a String to construct a result of the proper maximum size which is later
sliced.

2018-07-16  Hristian Kirtchev  <kirtchev@adacore.com>

gcc/ada/

* libgnat/s-wchwts.adb (Wide_String_To_String): Use the appropriate
longest sequence factor. Code clean up.
(Wide_Wide_String_To_String): Use the appropriate longest sequence
factor.  Code clean up.

gcc/testsuite/

* gnat.dg/wide_wide_value1.adb: New testcase.

From-SVN: r262713
gcc/ada/ChangeLog
gcc/ada/libgnat/s-wchwts.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/wide_wide_value1.adb [new file with mode: 0644]