From: Piotr Trojanek Date: Wed, 5 Aug 2020 20:17:02 +0000 (+0200) Subject: [Ada] Fix crash on illegal OTHERS in iterated_component_association X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ed9a428d02a5e3cd191aec9421808c5ce8ab7db3;p=gcc.git [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. --- 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;