[Ada] Missing runtime range checks with -gnatVa
authorJavier Miranda <miranda@adacore.com>
Tue, 9 Jul 2019 07:54:19 +0000 (07:54 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Tue, 9 Jul 2019 07:54:19 +0000 (07:54 +0000)
commit5da544339b2b3b3d00d3dd5b91c06d2d09a386b2
tree36f448a457bcf9b1d7ea86364fc4e3743f7c5b83
parentff606db0166573fee17f6d81895f7d882fd15169
[Ada] Missing runtime range checks with -gnatVa

Under validity checking mode the compiler may silently skip generating
code to perform runtime range checks.

2019-07-09  Javier Miranda  <miranda@adacore.com>

gcc/ada/

* exp_util.adb (Remove_Side_Effects): Preserve the
Do_Range_Check flag.

gcc/testsuite/

* gnat.dg/range_check3.adb, gnat.dg/range_check3_pkg.adb,
gnat.dg/range_check3_pkg.ads: New testcase.

From-SVN: r273278
gcc/ada/ChangeLog
gcc/ada/exp_util.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/range_check3.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/range_check3_pkg.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/range_check3_pkg.ads [new file with mode: 0644]