diff mbox series

[COMMITTED] ada: Allow initialization of limited objects with delta aggregates

Message ID 20221108084150.300930-1-poulhies@adacore.com
State New
Headers show
Series [COMMITTED] ada: Allow initialization of limited objects with delta aggregates | expand

Commit Message

Marc Poulhiès Nov. 8, 2022, 8:41 a.m. UTC
From: Piotr Trojanek <trojanek@adacore.com>

Objects of a limited type can be initialized with "aggregates", which is
a collective term for ordinary aggregates (i.e. record aggregates and
array aggregates), extension aggregates and finally for delta
aggregates (introduced by Ada 2022).

gcc/ada/

	* sem_ch3.adb (OK_For_Limited_Init_In_05): Handle delta aggregates
	just like other aggregates.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/sem_ch3.adb | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 76dc6325060..f6b852051dc 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -20145,6 +20145,7 @@  package body Sem_Ch3 is
 
       case Nkind (Original_Node (Exp)) is
          when N_Aggregate
+            | N_Delta_Aggregate
             | N_Extension_Aggregate
             | N_Function_Call
             | N_Op