[gcc r16-1225] ada: Fix libgpr2 build failure with compiler built with assertions
Marc Poulhies
dkm@gcc.gnu.org
Fri Jun 6 08:41:27 GMT 2025
https://gcc.gnu.org/g:c29774a1f35eb46c969b84af31a362bbd5d8855d
commit r16-1225-gc29774a1f35eb46c969b84af31a362bbd5d8855d
Author: Eric Botcazou <ebotcazou@adacore.com>
Date: Mon Feb 24 22:27:21 2025 +0100
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:
---
gcc/ada/sem_ch10.adb | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb
index 9af96fc41b6b..25bba9b60759 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;
More information about the Gcc-cvs
mailing list