From: Piotr Trojanek <troja...@adacore.com>

Code cleanup.

gcc/ada/

        * inline.adb (Has_Single_Return): Remove redundant check for
        empty list, because First works also for empty list.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 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)));
-- 
2.43.2

Reply via email to