From: Pierre-Marie de Rodat <dero...@adacore.com> 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. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/par_sco.adb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gcc/ada/par_sco.adb b/gcc/ada/par_sco.adb index 0639ca616e0..84af8bf9867 100644 --- a/gcc/ada/par_sco.adb +++ b/gcc/ada/par_sco.adb @@ -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. -- 2.42.0