diff options
author | Ed Schonberg <schonberg@adacore.com> | 2012-12-21 22:31:42 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2012-12-21 22:31:42 +0000 |
commit | a6b0643d99998771a52ae3d843e1cb2d3ec9b516 (patch) | |
tree | 391429a499e65a485f6cba4ea91b5a95d24dc399 /gcc | |
parent | 5c167ca0a208115ab6c8496946a2d9c208d8d859 (diff) | |
download | gcc-a6b0643d99998771a52ae3d843e1cb2d3ec9b516.zip gcc-a6b0643d99998771a52ae3d843e1cb2d3ec9b516.tar.gz gcc-a6b0643d99998771a52ae3d843e1cb2d3ec9b516.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/ada/sem_ch12.adb | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index f18c146..2bb659a 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,10 @@ +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> * adaint.c: Move directive around. diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb index 60edce3..10718c4 100644 --- a/gcc/ada/sem_ch12.adb +++ b/gcc/ada/sem_ch12.adb @@ -1448,10 +1448,15 @@ package body Sem_Ch12 is -- defined aspect/pragma Remote_Access_Type. In that case -- 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 and then Nkind (Formal_Type_Definition (Analyzed_Formal)) = N_Access_To_Object_Definition + and then Present (Match) then declare Formal_Ent : constant Entity_Id := |