From 5d2041a0c750a850129bc61f8000a6f4883fd295 Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Wed, 9 Sep 2020 22:55:36 +0200 Subject: [PATCH] [Ada] Fix interference between iterated element-and-component association gcc/ada/ * par-ch4.adb (P_Iterated_Component_Association): Move code for iterated_element_association to Build_Iterated_Element_Association. --- gcc/ada/par-ch4.adb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gcc/ada/par-ch4.adb b/gcc/ada/par-ch4.adb index df438424fbf..a14690239b6 100644 --- a/gcc/ada/par-ch4.adb +++ b/gcc/ada/par-ch4.adb @@ -3438,6 +3438,12 @@ package body Ch4 is procedure Build_Iterated_Element_Association is begin + -- Build loop_parameter_specification + + Loop_Spec := + New_Node (N_Loop_Parameter_Specification, Prev_Token_Ptr); + Set_Defining_Identifier (Loop_Spec, Id); + Choice := First (Discrete_Choices (Assoc_Node)); Assoc_Node := New_Node (N_Iterated_Element_Association, Prev_Token_Ptr); @@ -3488,12 +3494,6 @@ package body Ch4 is Filter := P_Condition; end if; - -- Build loop_parameter_specification - - Loop_Spec := - New_Node (N_Loop_Parameter_Specification, Prev_Token_Ptr); - Set_Defining_Identifier (Loop_Spec, Id); - if Token = Tok_Use then -- Ada_2020 Key-expression is present, rewrite node as an -- 2.30.2