]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Fix crash on illegal OTHERS in iterated_component_association
authorPiotr Trojanek <trojanek@adacore.com>
Wed, 5 Aug 2020 20:17:02 +0000 (22:17 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 21 Oct 2020 07:22:48 +0000 (03:22 -0400)
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

index cb49a25e861fbc99971020050ed2ae39115a26b8..9285c1cae3cdaf057c0d215d46c7d22f607cab09 100644 (file)
@@ -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;