aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2025-02-24 22:27:21 +0100
committerEric Botcazou <ebotcazou@adacore.com>2025-06-06 16:44:46 +0200
commite0777e78bede3108d41a506d8877c03997bed2c5 (patch)
treea27fa9759a5c23e0b690e6b215967dc3813d0bc0 /gcc
parentcb3e76508b1af7ff5ba6e43592d7d67bbb96fac6 (diff)
downloadgcc-e0777e78bede3108d41a506d8877c03997bed2c5.zip
gcc-e0777e78bede3108d41a506d8877c03997bed2c5.tar.gz
gcc-e0777e78bede3108d41a506d8877c03997bed2c5.tar.bz2
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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/sem_ch10.adb2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb
index de5a8c8..e3d9925 100644
--- a/gcc/ada/sem_ch10.adb
+++ b/gcc/ada/sem_ch10.adb
@@ -4932,6 +4932,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;