[Ada] Missing check on outbound parameter of a non-null access type
Pierre-Marie de Rodat
derodat@adacore.com
Mon Aug 12 09:10:00 GMT 2019
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.
Tested on x86_64-pc-linux-gnu, committed on trunk
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 3228 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190812/4c7da303/attachment.bin>
More information about the Gcc-patches
mailing list