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 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.