From: Ronan Desplanques Date: Fri, 9 May 2025 08:15:09 +0000 (+0200) Subject: ada: Remove useless subexpressions X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c687da8189ec29c1dc8c25429b98fbd9f66b0d2e;p=thirdparty%2Fgcc.git ada: Remove useless subexpressions The subexpressions this patch removes were clearly useless given the test for "No (Scheme)" in a preceding condition. gcc/ada/ChangeLog: * exp_ch5.adb (Expand_N_Loop_Statement): Remove useless subexpressions. --- diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb index 3d8a542c24e..f1a7610bf28 100644 --- a/gcc/ada/exp_ch5.adb +++ b/gcc/ada/exp_ch5.adb @@ -5980,8 +5980,7 @@ package body Exp_Ch5 is -- ... -- end loop - elsif Present (Scheme) - and then Present (Condition_Actions (Scheme)) + elsif Present (Condition_Actions (Scheme)) and then Present (Condition (Scheme)) then declare @@ -6013,9 +6012,7 @@ package body Exp_Ch5 is -- Here to deal with iterator case - elsif Present (Scheme) - and then Present (Iterator_Specification (Scheme)) - then + elsif Present (Iterator_Specification (Scheme)) then Expand_Iterator_Loop (N); -- An iterator loop may generate renaming declarations for elements