From c687da8189ec29c1dc8c25429b98fbd9f66b0d2e Mon Sep 17 00:00:00 2001 From: Ronan Desplanques Date: Fri, 9 May 2025 10:15:09 +0200 Subject: [PATCH] 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. --- 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 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 -- 2.47.2