diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2022-12-29 20:19:36 +0100 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-01-09 15:42:23 +0100 |
commit | a53fb5761e6f4c924612727bcd27678936c1ee3f (patch) | |
tree | f6c71d4d1ad737ff8852bf7d8960bf0e3205b213 /gcc/ada | |
parent | d4eaf83d6eff980ec001bd54f2c4e87b34057bf6 (diff) | |
download | gcc-a53fb5761e6f4c924612727bcd27678936c1ee3f.zip gcc-a53fb5761e6f4c924612727bcd27678936c1ee3f.tar.gz gcc-a53fb5761e6f4c924612727bcd27678936c1ee3f.tar.bz2 |
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.
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/exp_ch7.adb | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb index f29a97a..8687861 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 |