public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Marc Poulhi?s <dkm@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-5070] ada: Remove a couple of unreachable statements Date: Mon, 9 Jan 2023 14:43:53 +0000 (GMT) [thread overview] Message-ID: <20230109144353.AB6393858D3C@sourceware.org> (raw) https://gcc.gnu.org/g:a53fb5761e6f4c924612727bcd27678936c1ee3f commit r13-5070-ga53fb5761e6f4c924612727bcd27678936c1ee3f Author: Eric Botcazou <ebotcazou@adacore.com> 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
reply other threads:[~2023-01-09 14:43 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230109144353.AB6393858D3C@sourceware.org \ --to=dkm@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).