From: Piotr Trojanek Date: Fri, 5 Jul 2024 15:16:36 +0000 (+0200) Subject: ada: Simplify manipulation of the list with loop actions X-Git-Tag: basepoints/gcc-16~6869 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=913fa16483256daacd576476312dfcc2d2421517;p=thirdparty%2Fgcc.git ada: Simplify manipulation of the list with loop actions Code cleanup; behavior is unaffected. gcc/ada/ * exp_aggr.adb (Add_Loop_Actions): Change manipulation of list to avoid unnecessary calls to Parent and Loop_Actions. --- diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index 7a2d0570dbd..8496fcd9b00 100644 --- a/gcc/ada/exp_aggr.adb +++ b/gcc/ada/exp_aggr.adb @@ -1262,9 +1262,9 @@ package body Exp_Aggr is elsif Nkind (Parent (Expr)) = N_Component_Association and then Present (Loop_Actions (Parent (Expr))) then - Append_List (Lis, Loop_Actions (Parent (Expr))); Res := Loop_Actions (Parent (Expr)); Set_Loop_Actions (Parent (Expr), No_List); + Append_List (Lis, To => Res); return Res; else