Following the work on the Ada 202X feature of iterated aggregates
(AI12-061), Loop_Actions should have been listed as a semantic field of
nodes of kind N_Iterated_Component_Association.  Fix this as well as the
new extended AST traversal which should traverse these fields.

There is no impact on compilation.

Tested on x86_64-pc-linux-gnu, committed on trunk

2019-08-13  Yannick Moy  <m...@adacore.com>

gcc/ada/

        * sem_util.adb (Traverse_More_Func): Take into account
        Loop_Actions inside N_Iterated_Component_Association nodes.
        * sinfo.ads: Document correctly Loop_Actions as a field of nodes
        of kind N_Iterated_Component_Association.
--- gcc/ada/sem_util.adb
+++ gcc/ada/sem_util.adb
@@ -25580,6 +25580,9 @@ package body Sem_Util is
             when N_Case_Expression_Alternative =>
                Traverse_More (Actions (Node),           Result);
 
+            when N_Iterated_Component_Association =>
+               Traverse_More (Loop_Actions (Node),      Result);
+
             when N_Iteration_Scheme =>
                Traverse_More (Condition_Actions (Node), Result);
 

--- gcc/ada/sinfo.ads
+++ gcc/ada/sinfo.ads
@@ -11959,7 +11959,7 @@ package Sinfo is
 
      N_Iterated_Component_Association =>
        (1 => True,    --  Defining_Identifier (Node1)
-        2 => False,   --  unused
+        2 => True,    --  Loop_Actions (List2-Sem)
         3 => True,    --  Expression (Node3)
         4 => True,    --  Discrete_Choices (List4)
         5 => False),  --  unused

Reply via email to