diff options
author | Ed Schonberg <schonberg@adacore.com> | 2019-08-12 09:01:48 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2019-08-12 09:01:48 +0000 |
commit | 68e4cc9854044a2f66623c5d8dd36bc27bd948f2 (patch) | |
tree | 64f745c46e52948df67f3708e126e95652f6684a /gcc/tree.c | |
parent | 8e4ca4fcffbe6d3855f67cd02e0bb2a40d62fa10 (diff) | |
download | gcc-68e4cc9854044a2f66623c5d8dd36bc27bd948f2.zip gcc-68e4cc9854044a2f66623c5d8dd36bc27bd948f2.tar.gz gcc-68e4cc9854044a2f66623c5d8dd36bc27bd948f2.tar.bz2 |
[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.
From-SVN: r274306
Diffstat (limited to 'gcc/tree.c')
0 files changed, 0 insertions, 0 deletions