aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ada/sem_ch5.adb9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb
index 17bf6d9..6d07f3d 100644
--- a/gcc/ada/sem_ch5.adb
+++ b/gcc/ada/sem_ch5.adb
@@ -2429,11 +2429,12 @@ package body Sem_Ch5 is
if not Is_Entity_Name (Iter_Name)
- -- When the context is a quantified expression, the renaming
- -- declaration is delayed until the expansion phase if we are
- -- doing expansion.
+ -- When the context is a quantified expression or iterated component
+ -- association, the renaming declaration is delayed until the
+ -- expansion phase if we are doing expansion.
- and then (Nkind (Parent (N)) /= N_Quantified_Expression
+ and then (Nkind (Parent (N)) not in N_Quantified_Expression
+ | N_Iterated_Component_Association
or else (Operating_Mode = Check_Semantics
and then not GNATprove_Mode))