https://gcc.gnu.org/g:c687da8189ec29c1dc8c25429b98fbd9f66b0d2e
commit r16-1861-gc687da8189ec29c1dc8c25429b98fbd9f66b0d2e Author: Ronan Desplanques <desplanq...@adacore.com> Date: Fri May 9 10:15:09 2025 +0200 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: --- gcc/ada/exp_ch5.adb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb index 3d8a542c24e0..f1a7610bf28f 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