aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorYannick Moy <moy@adacore.com>2019-08-13 08:06:18 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-08-13 08:06:18 +0000
commit96cdd379c398499f0b19e3b469b72b77857995c6 (patch)
tree9aa7fad1c8ca248cdf72d4118361dfc3b007e390 /gcc
parentdfa6d55af715a2b902d6ed30f2c0276b1709dd5b (diff)
downloadgcc-96cdd379c398499f0b19e3b469b72b77857995c6.zip
gcc-96cdd379c398499f0b19e3b469b72b77857995c6.tar.gz
gcc-96cdd379c398499f0b19e3b469b72b77857995c6.tar.bz2
[Ada] Complete the more extended AST traversal used in GNATprove
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. 2019-08-13 Yannick Moy <moy@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. From-SVN: r274332
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog7
-rw-r--r--gcc/ada/sem_util.adb3
-rw-r--r--gcc/ada/sinfo.ads2
3 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 892cbbf..5b88950 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,10 @@
+2019-08-13 Yannick Moy <moy@adacore.com>
+
+ * 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.
+
2019-08-13 Claire Dross <dross@adacore.com>
* libgnat/a-cfinve.adb, libgnat/a-cofove.adb (Find_Index,
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 54ac0a4..4f20eaa 100644
--- a/gcc/ada/sem_util.adb
+++ b/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);
diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads
index 064147e..e3f7fd3 100644
--- a/gcc/ada/sinfo.ads
+++ b/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