r274306 - in /trunk/gcc: ada/ChangeLog ada/exp_...

pmderodat@gcc.gnu.org pmderodat@gcc.gnu.org
Mon Aug 12 09:08:00 GMT 2019


Author: pmderodat
Date: Mon Aug 12 09:01:48 2019
New Revision: 274306

URL: https://gcc.gnu.org/viewcvs?rev=274306&root=gcc&view=rev
Log:
[Ada] Missing check on outbound parameter of a non-null access type

This patch adds code to generate proper post-call checks when an actual
for an in-out or out parameter has a non-null access type. No
constraints are applied to an inbound access parameter, but on exit a
not-null check must be performed if the type of the actual requires it.

2019-08-12  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

	* exp_ch6.adb (Expand_Actuals. Add_Call_By_Copy_Code): Add code
	to generate proper checks when an actual for an in-out or out
	parameter has a non-null access type.  No constraints are
	applied to an inbound access parameter, but on exit a not-null
	check must be performed if the type of the actual requires it.

gcc/testsuite/

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

Added:
    trunk/gcc/testsuite/gnat.dg/null_check.adb
Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/exp_ch6.adb
    trunk/gcc/testsuite/ChangeLog



More information about the Gcc-cvs mailing list