]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Volatility, validity checks, and System.Aux_DEC
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 11 Dec 2018 11:12:11 +0000 (11:12 +0000)
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 11 Dec 2018 11:12:11 +0000 (11:12 +0000)
commitbecb611194705df0c131a3d94f6767499f8ef7ac
treee3f703a0ecfaf3f6139a4704698b7addc6ec8297
parent2176c4d01486331c9be066a95ee2e54a2db81d57
[Ada] Volatility, validity checks, and System.Aux_DEC

This patch updates validity checks to prevent the validation of an
by-reference formal parameter because the parameter is not being read in
the process.

2018-12-11  Hristian Kirtchev  <kirtchev@adacore.com>

gcc/ada/

* checks.adb: Add with and use clauses for Sem_Mech.
(Ensure_Valid): Update the "annoying special case" to include
entry and function calls. Use Get_Called_Entity to obtain the
entry or subprogram being invoked, rather than retrieving it
manually. Parameters passed by reference do not need a validity
check.

gcc/testsuite/

* gnat.dg/valid4.adb, gnat.dg/valid4_pkg.adb,
gnat.dg/valid4_pkg.ads: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@267012 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/ChangeLog
gcc/ada/checks.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/valid4.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/valid4_pkg.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/valid4_pkg.ads [new file with mode: 0644]