From: Eric Botcazou Date: Tue, 4 Feb 2025 18:48:09 +0000 (+0100) Subject: Ada: Fix assertion failure with iterator in container aggregate X-Git-Tag: basepoints/gcc-16~2194 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64c66f5bce60fcc4a943bcac1865db2a72aaa1bd;p=thirdparty%2Fgcc.git Ada: Fix assertion failure with iterator in container aggregate It's just a missing test for the presence of a nonempty parameter. gcc/ada/ PR ada/118731 * sem_aggr.adb (Resolve_Iterated_Association): Add missing guard. --- 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;