[Ada] No warning for guaranteed accessibility check failures
authorJustin Squirek <squirek@adacore.com>
Thu, 11 Jul 2019 08:01:30 +0000 (08:01 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Thu, 11 Jul 2019 08:01:30 +0000 (08:01 +0000)
commitccf173059688499749a30b3252cc3c4ea4ab0d0c
tree9f6cb8f06328b7298cccd7e69f9360f70b98d372
parenta1a8b1726cf8de2ed244353a9c8cd2fab12e4c71
[Ada] No warning for guaranteed accessibility check failures

This patch corrects the generation of dynamic accessibility checks which
are guaranteed to trigger errors during run time so as to give the user
proper warning during unit compiliation.

2019-07-11  Justin Squirek  <squirek@adacore.com>

gcc/ada/

* checks.adb (Apply_Accessibility_Check): Add check for constant
folded conditions on accessibility checks.

gcc/testsuite/

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

From-SVN: r273381
gcc/ada/ChangeLog
gcc/ada/checks.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/access7.adb [new file with mode: 0644]