aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/sem_aggr.adb10
2 files changed, 11 insertions, 4 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index f51e899..2cc7357 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,8 @@
+2025-06-17 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR ada/120665
+ * sem_aggr.adb (Resolve_Container_Aggregate): Use robust guards.
+
2025-06-12 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.cc (gnat_to_gnu_entity) <E_Variable>: Generate
diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb
index f4fa1ad..1bcb4b9 100644
--- a/gcc/ada/sem_aggr.adb
+++ b/gcc/ada/sem_aggr.adb
@@ -4054,8 +4054,8 @@ package body Sem_Aggr is
if Present (Add_Unnamed_Subp)
and then No (New_Indexed_Subp)
- and then Present (Etype (Add_Unnamed_Subp))
- and then Etype (Add_Unnamed_Subp) /= Any_Type
+ and then Present (Entity (Add_Unnamed_Subp))
+ and then Entity (Add_Unnamed_Subp) /= Any_Id
then
declare
Elmt_Type : constant Entity_Id :=
@@ -4101,7 +4101,8 @@ package body Sem_Aggr is
end;
elsif Present (Add_Named_Subp)
- and then Etype (Add_Named_Subp) /= Any_Type
+ and then Present (Entity (Add_Named_Subp))
+ and then Entity (Add_Named_Subp) /= Any_Id
then
declare
-- Retrieves types of container, key, and element from the
@@ -4155,7 +4156,8 @@ package body Sem_Aggr is
end;
elsif Present (Assign_Indexed_Subp)
- and then Etype (Assign_Indexed_Subp) /= Any_Type
+ and then Present (Entity (Assign_Indexed_Subp))
+ and then Entity (Assign_Indexed_Subp) /= Any_Id
then
-- Indexed Aggregate. Positional or indexed component
-- can be present, but not both. Choices must be static