From ed9a428d02a5e3cd191aec9421808c5ce8ab7db3 Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Wed, 5 Aug 2020 22:17:02 +0200 Subject: [PATCH] [Ada] Fix crash on illegal OTHERS in iterated_component_association gcc/ada/ * sem_aggr.adb (Resolve_Array_Aggregate): Use Choice_List, which internally calls either Choice or Discrete_Choices, depending on the context. --- gcc/ada/sem_aggr.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb index cb49a25e861..9285c1cae3c 100644 --- a/gcc/ada/sem_aggr.adb +++ b/gcc/ada/sem_aggr.adb @@ -1837,7 +1837,7 @@ package body Sem_Aggr is if Others_Present and then not Others_Allowed then Error_Msg_N ("OTHERS choice not allowed here", - First (Choices (First (Component_Associations (N))))); + First (Choice_List (First (Component_Associations (N))))); return Failure; end if; -- 2.30.2