From: Eric Botcazou Date: Mon, 24 Feb 2025 21:27:21 +0000 (+0100) Subject: ada: Fix libgpr2 build failure with compiler built with assertions X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c29774a1f35eb46c969b84af31a362bbd5d8855d;p=thirdparty%2Fgcc.git ada: Fix libgpr2 build failure with compiler built with assertions The problem is that the Entity field is accessed for a node without one. gcc/ada/ChangeLog: * sem_ch10.adb (Install_Siblings.In_Context): Add missing guard. --- diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb index 9af96fc41b6..25bba9b6075 100644 --- a/gcc/ada/sem_ch10.adb +++ b/gcc/ada/sem_ch10.adb @@ -4924,6 +4924,8 @@ package body Sem_Ch10 is if Entity (Name (Clause)) = Id or else (Nkind (Name (Clause)) = N_Expanded_Name + and then + Is_Entity_Name (Prefix (Name (Clause))) and then Entity (Prefix (Name (Clause))) = Id) then return True;