From: Pierre-Marie de Rodat Date: Thu, 19 Oct 2023 12:17:24 +0000 (+0000) Subject: ada: Fix SCOs generation for aspect specifications X-Git-Tag: basepoints/gcc-15~4496 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fee5b643574e16cb2860ab6d6e26ccb0ed60f91a;p=thirdparty%2Fgcc.git 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. --- 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.