]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/ada/sem_aggr.adb
[multiple changes]
[thirdparty/gcc.git] / gcc / ada / sem_aggr.adb
index 1f72ed9f555eb1d5dbdece04f4c5001c42a16109..157b20241490242dfa1f733a8ad4e60d1aef7369 100644 (file)
@@ -1055,6 +1055,10 @@ package body Sem_Aggr is
             --  formal parameter. Consequently we also need to test for
             --  N_Procedure_Call_Statement or N_Function_Call.
 
+            --  The context may be an N_Reference node, created by expansion.
+            --  Legality of the others clause was established in the source,
+            --  so the context is legal.
+
             Set_Etype (N, Aggr_Typ);  --  May be overridden later on
 
             if Pkind = N_Assignment_Statement
@@ -1070,6 +1074,7 @@ package body Sem_Aggr is
                            Pkind = N_Component_Declaration     or else
                            Pkind = N_Parameter_Specification   or else
                            Pkind = N_Qualified_Expression      or else
+                           Pkind = N_Reference                 or else
                            Pkind = N_Aggregate                 or else
                            Pkind = N_Extension_Aggregate       or else
                            Pkind = N_Component_Association))