-- The write-back of (in)-out parameters is handled by the back-end,
-- but the constraint checks generated when subtypes of formal and
-- actual don't match must be inserted in the form of assignments.
+ -- Also do this in the case of explicit dereferences, which can occur
+ -- due to rewritings of function calls with controlled results.
if Nkind (N) = N_Function_Call
or else Nkind (Original_Node (N)) = N_Function_Call
+ or else Nkind (N) = N_Explicit_Dereference
then
pragma Assert (Ada_Version >= Ada_2012);
-- Functions with '[in] out' parameters are only allowed in Ada