https://gcc.gnu.org/g:33f560e2722912fd86cd2c9b8584bdb81726dae8
commit r15-263-g33f560e2722912fd86cd2c9b8584bdb81726dae8 Author: Piotr Trojanek <troja...@adacore.com> Date: Mon Aug 22 21:36:11 2022 +0200 ada: Remove redundant guard against empty list of declarations Code cleanup. gcc/ada/ * inline.adb (Has_Single_Return): Remove redundant check for empty list, because First works also for empty list. Diff: --- gcc/ada/inline.adb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb index 169a22c0ba5..a628a59e145 100644 --- a/gcc/ada/inline.adb +++ b/gcc/ada/inline.adb @@ -4809,8 +4809,7 @@ package body Inline is else return - Present (Declarations (N)) - and then Present (First (Declarations (N))) + Present (First (Declarations (N))) and then Nkind (First (Declarations (N))) = N_Object_Declaration and then Entity (Expression (Return_Statement)) = Defining_Identifier (First (Declarations (N)));