Commit 4efe11c6 by Ghjuvan Lacambre Committed by Pierre-Marie de Rodat

[Ada] Validate_Access_Subprogram_Instance: check if not null types match

2019-12-16  Ghjuvan Lacambre  <lacambre@adacore.com>

gcc/ada/

	* sem_ch12.adb (Validate_Access_Subprogram_Instance): Add
	Can_Never_Be_Null checks.

From-SVN: r279413
parent d6c7e020
2019-12-16 Ghjuvan Lacambre <lacambre@adacore.com>
* sem_ch12.adb (Validate_Access_Subprogram_Instance): Add
Can_Never_Be_Null checks.
2019-12-16 Eric Botcazou <ebotcazou@adacore.com> 2019-12-16 Eric Botcazou <ebotcazou@adacore.com>
* doc/gnat_rm/implementation_defined_pragmas.rst (VFA): Document * doc/gnat_rm/implementation_defined_pragmas.rst (VFA): Document
......
...@@ -12303,6 +12303,12 @@ package body Sem_Ch12 is ...@@ -12303,6 +12303,12 @@ package body Sem_Ch12 is
Error_Msg_NE Error_Msg_NE
("actual for formal & must have convention %", Actual, Gen_T); ("actual for formal & must have convention %", Actual, Gen_T);
end if; end if;
if Can_Never_Be_Null (A_Gen_T) /= Can_Never_Be_Null (Act_T) then
Error_Msg_NE
("non null exclusion of actual and formal & do not match",
Actual, Gen_T);
end if;
end Validate_Access_Subprogram_Instance; end Validate_Access_Subprogram_Instance;
----------------------------------- -----------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment