]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Fix SCOs generation for aspect specifications
authorPierre-Marie de Rodat <derodat@adacore.com>
Thu, 19 Oct 2023 12:17:24 +0000 (12:17 +0000)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 21 Nov 2023 09:57:40 +0000 (10:57 +0100)
The recent overhaul for the representation of aspect specifications in
the tree broke SCOs generation: decisions that appeared in aspects were
processed twice, leading to the emission of erroneous obligations. Tweak
SCOs generation to skip aspect specifications the second time to go back
to the previous behavior.

gcc/ada/

* par_sco.adb (Process_Decisions)<Process_Node>: Skip aspect
specifications.

gcc/ada/par_sco.adb

index 0639ca616e0851e43a717f462690548110f0e5e7..84af8bf9867634fd9b7ee0fab1d17f80726f1598 100644 (file)
@@ -751,6 +751,13 @@ package body Par_SCO is
       begin
          case Nkind (N) is
 
+            --  Aspect specifications have dedicated processings (see
+            --  Traverse_Aspects) so ignore them here, so that they are
+            --  processed only once.
+
+            when N_Aspect_Specification =>
+               return Skip;
+
             --  Logical operators, output table entries and then process
             --  operands recursively to deal with nested conditions.