Commit a6b0643d by Ed Schonberg Committed by Eric Botcazou

re PR ada/53737 (Assert_Failure on a generic package with a package as parameter)

	PR ada/53737
	* sem_ch12.adb (Analyze_Associations): Do not check the legality of
	actuals for RACW types if this is an internal instantiation for a formal
	package with defaulted parameters.

From-SVN: r194687
parent 5c167ca0
2012-12-21 Ed Schonberg <schonberg@adacore.com>
PR ada/53737
* sem_ch12.adb (Analyze_Associations): Do not check the legality of
actuals for RACW types if this is an internal instantiation for a formal
package with defaulted parameters.
2012-12-21 Eric Botcazou <ebotcazou@adacore.com> 2012-12-21 Eric Botcazou <ebotcazou@adacore.com>
* adaint.c: Move directive around. * adaint.c: Move directive around.
......
...@@ -1448,10 +1448,15 @@ package body Sem_Ch12 is ...@@ -1448,10 +1448,15 @@ package body Sem_Ch12 is
-- defined aspect/pragma Remote_Access_Type. In that case -- defined aspect/pragma Remote_Access_Type. In that case
-- the actual must be remote as well. -- the actual must be remote as well.
-- If the current instantiation is the construction of a
-- local copy for a formal package the actuals may be
-- defaulted, and there is no matching actual to check.
if Nkind (Analyzed_Formal) = N_Formal_Type_Declaration if Nkind (Analyzed_Formal) = N_Formal_Type_Declaration
and then and then
Nkind (Formal_Type_Definition (Analyzed_Formal)) = Nkind (Formal_Type_Definition (Analyzed_Formal)) =
N_Access_To_Object_Definition N_Access_To_Object_Definition
and then Present (Match)
then then
declare declare
Formal_Ent : constant Entity_Id := Formal_Ent : constant Entity_Id :=
......
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