aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2020-08-05 22:17:02 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2020-10-21 03:22:48 -0400
commited9a428d02a5e3cd191aec9421808c5ce8ab7db3 (patch)
tree536b7077eba2de90137694c58028e04236fd8b8e
parente22557ee955225b6a2d42215b5e07b22f18d88d2 (diff)
downloadgcc-ed9a428d02a5e3cd191aec9421808c5ce8ab7db3.zip
gcc-ed9a428d02a5e3cd191aec9421808c5ce8ab7db3.tar.gz
gcc-ed9a428d02a5e3cd191aec9421808c5ce8ab7db3.tar.bz2
[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.
-rw-r--r--gcc/ada/sem_aggr.adb2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb
index cb49a25..9285c1c 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;