Ada RM 3.3 says that "aggregate" is an object, but GNAT represents
"aggregate" either as N_Aggregate, N_Delta_Aggregate or
N_Extension_Aggregate.

With this patch both extension and delta aggregates are accepted where
object is required, e.g. as a prefix of attribute Size.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

        * sem_util.adb (Is_Object_Reference): Delta and extension
        aggregates are objects.
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -18324,7 +18324,10 @@ package body Sem_Util is
 
             --  In Ada 95 an aggregate is an object reference
 
-            when N_Aggregate =>
+            when N_Aggregate
+               | N_Delta_Aggregate
+               | N_Extension_Aggregate
+            =>
                return Ada_Version >= Ada_95;
 
             --  A string literal is not an object reference, but it might come


Reply via email to