]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR ada/53737 (Assert_Failure on a generic package with a package as parameter)
authorEd Schonberg <schonberg@adacore.com>
Fri, 21 Dec 2012 22:31:42 +0000 (22:31 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Fri, 21 Dec 2012 22:31:42 +0000 (22:31 +0000)
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

gcc/ada/ChangeLog
gcc/ada/sem_ch12.adb

index f18c14653ea77fd8ebf6e22af3f5601ea734b037..2bb659a52debcb7a5913825602909ccb71435e63 100644 (file)
@@ -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.
index 60edce32f2dac51af5121b3bff74634e007d8f86..10718c4ec3f9c362525be4a6c23d584a83a82662 100644 (file)
@@ -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 :=