[gcc r17-885] ada: Fix assertion failure for improper aggregate operation
Marc Poulhies
dkm@gcc.gnu.org
Thu May 28 08:57:21 GMT 2026
https://gcc.gnu.org/g:8ab3f30e7af08c56832a27751fad1594f91eaf10
commit r17-885-g8ab3f30e7af08c56832a27751fad1594f91eaf10
Author: Eric Botcazou <ebotcazou@adacore.com>
Date: Fri Mar 6 12:27:20 2026 +0100
ada: Fix assertion failure for improper aggregate operation
The compiler takes the Entity of a node without checking that it may.
gcc/ada/ChangeLog:
* sem_ch13.adb (Resolve_Aspect_Aggregate.Resolve_Operation): Add
missing guard for the presence of Entity on the node.
Diff:
---
gcc/ada/sem_ch13.adb | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index 0be8f323691d..a08b13445db5 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -18235,7 +18235,9 @@ package body Sem_Ch13 is
begin
if not Is_Overloaded (Subp_Id) then
- if not Pred (Entity (Subp_Id)) then
+ if not Is_Entity_Name (Subp_Id)
+ or else not Pred (Entity (Subp_Id))
+ then
Error_Msg_NE
("improper aggregate operation for&", Subp_Id, Typ);
end if;
More information about the Gcc-cvs
mailing list