From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7871) id AB6393858D3C; Mon, 9 Jan 2023 14:43:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AB6393858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673275433; bh=V7XUq2FJvCF7U9uJd/BzsFHSxV7ahzCe1yCU5aq4c3k=; h=From:To:Subject:Date:From; b=aluPSDXKZ43arOfPYJc+O4klq1EPC3xA4Awtgj4C6+GA2EJ5yIHpAaAWpFPrVbzpJ 8kUfPLAB1P/PbDBmIz8kdpdbqY6BpnLSGTYLYzoTA2J/BkLRnqcjxMqyqrcsjVSKVW jSC9tkiwzyuzAubUSXedCcvSUW/bwKGHJj2Y9gVg= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Marc Poulhi?s To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-5070] ada: Remove a couple of unreachable statements X-Act-Checkin: gcc X-Git-Author: Eric Botcazou X-Git-Refname: refs/heads/master X-Git-Oldrev: d4eaf83d6eff980ec001bd54f2c4e87b34057bf6 X-Git-Newrev: a53fb5761e6f4c924612727bcd27678936c1ee3f Message-Id: <20230109144353.AB6393858D3C@sourceware.org> Date: Mon, 9 Jan 2023 14:43:53 +0000 (GMT) List-Id: https://gcc.gnu.org/g:a53fb5761e6f4c924612727bcd27678936c1ee3f commit r13-5070-ga53fb5761e6f4c924612727bcd27678936c1ee3f Author: Eric Botcazou Date: Thu Dec 29 20:19:36 2022 +0100 ada: Remove a couple of unreachable statements The "then" arm of these nested if-statements is trivially unreachable. gcc/ada/ * exp_ch7.adb (Make_Adjust_Call): Remove unreachable statement. (Make_Final_Call): Likewise. Diff: --- gcc/ada/exp_ch7.adb | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb index f29a97a0ceb..86878616f6a 100644 --- a/gcc/ada/exp_ch7.adb +++ b/gcc/ada/exp_ch7.adb @@ -6043,11 +6043,7 @@ package body Exp_Ch7 is -- Derivations from [Limited_]Controlled elsif Is_Controlled (Utyp) then - if Has_Controlled_Component (Utyp) then - Adj_Id := Find_Optional_Prim_Op (Utyp, TSS_Deep_Adjust); - else - Adj_Id := Find_Optional_Prim_Op (Utyp, Name_Of (Adjust_Case)); - end if; + Adj_Id := Find_Optional_Prim_Op (Utyp, Name_Of (Adjust_Case)); -- Tagged types @@ -8396,11 +8392,7 @@ package body Exp_Ch7 is -- Derivations from [Limited_]Controlled elsif Is_Controlled (Utyp) then - if Has_Controlled_Component (Utyp) then - Fin_Id := Find_Optional_Prim_Op (Utyp, TSS_Deep_Finalize); - else - Fin_Id := Find_Optional_Prim_Op (Utyp, Name_Of (Finalize_Case)); - end if; + Fin_Id := Find_Optional_Prim_Op (Utyp, Name_Of (Finalize_Case)); -- Tagged types