It's just a missing test for the presence of a nonempty parameter.
Tested on x86-64/Linux, applied on the mainline.
2025-02-04 Eric Botcazou <ebotca...@adacore.com>
PR ada/118731
* sem_aggr.adb (Resolve_Iterated_Association): Add missing guard.
--
Eric Botcazou
diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb
index f6db5cb97a4..a7ec772823f 100644
--- a/gcc/ada/sem_aggr.adb
+++ b/gcc/ada/sem_aggr.adb
@@ -3933,6 +3933,7 @@ package body Sem_Aggr is
if Is_Entity_Name (Choice)
and then Is_Type (Entity (Choice))
+ and then Present (Key_Type)
and then Base_Type (Entity (Choice)) = Base_Type (Key_Type)
then
null;