[Ada] Ensure meaningless digits in a string are discarded
authorNicolas Roche <roche@adacore.com>
Mon, 22 Jul 2019 13:56:59 +0000 (13:56 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 22 Jul 2019 13:56:59 +0000 (13:56 +0000)
commit7ddc639b7717278075ab1989568d1769ccc040e1
tree1477f342b83f62fafa3f575a5875330166c756b8
parent52860cc145a7075a9f30840703f96b242cd0150f
[Ada] Ensure meaningless digits in a string are discarded

2019-07-22  Nicolas Roche  <roche@adacore.com>

gcc/ada/

* libgnat/s-valrea.adb (Scan_Real): Ignore non significative
digits to avoid converging to infinity in some cases.

gcc/testsuite/

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

From-SVN: r273675
gcc/ada/ChangeLog
gcc/ada/libgnat/s-valrea.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/float_value1.adb [new file with mode: 0644]