From fee5b643574e16cb2860ab6d6e26ccb0ed60f91a Mon Sep 17 00:00:00 2001 From: Pierre-Marie de Rodat Date: Thu, 19 Oct 2023 12:17:24 +0000 Subject: [PATCH] ada: Fix SCOs generation for aspect specifications 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): Skip aspect specifications. --- 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 0639ca616e08..84af8bf98676 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.47.2