From 51ad879c72e77f8a4021256c4aaf5567c6f587cf Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Mon, 25 Oct 2021 21:15:58 +0200 Subject: [PATCH] [Ada] Fix detection of array aggregates with single others associations gcc/ada/ * checks.adb (Apply_Constraint_Check): Guard against calling Choices when the first association in an array aggregate is a N_Iterated_Component_Association node. --- gcc/ada/checks.adb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb index bbccab765c05..6fb33b45ae94 100644 --- a/gcc/ada/checks.adb +++ b/gcc/ada/checks.adb @@ -1388,6 +1388,8 @@ package body Checks is if Nkind (N) = N_Aggregate and then No (Expressions (N)) + and then Nkind (First (Component_Associations (N))) = + N_Component_Association and then Nkind (First (Choices (First (Component_Associations (N))))) = N_Others_Choice -- 2.47.2