aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2023-10-03 19:43:04 +0200
committerMarc Poulhiès <poulhies@adacore.com>2023-11-07 10:15:02 +0100
commitfe11fa6bd48a781c6acf0416aff1568e0d66f077 (patch)
tree7cc63b7e3057ddeecdbf177f1fc2c64ca2fed870
parentdedaaa81cc7c518404080505e9b74aa0919c7587 (diff)
downloadgcc-fe11fa6bd48a781c6acf0416aff1568e0d66f077.zip
gcc-fe11fa6bd48a781c6acf0416aff1568e0d66f077.tar.gz
gcc-fe11fa6bd48a781c6acf0416aff1568e0d66f077.tar.bz2
ada: Remove duplicated code for expansion of packed array assignments
Expansion of assignments to packed array objects has two cases and had duplicated code for both these cases. gcc/ada/ * exp_pakd.adb (Expand_Bit_Packed_Element_Set): Remove code from the ELSE branch, because it was is identical to code before the IF statements itself.
-rw-r--r--gcc/ada/exp_pakd.adb4
1 files changed, 0 insertions, 4 deletions
diff --git a/gcc/ada/exp_pakd.adb b/gcc/ada/exp_pakd.adb
index 2b92c46..19d158f 100644
--- a/gcc/ada/exp_pakd.adb
+++ b/gcc/ada/exp_pakd.adb
@@ -1432,7 +1432,6 @@ package body Exp_Pakd is
Bits_nn : constant Entity_Id := RTE (Bits_Id (Csiz));
Set_nn : Entity_Id;
Subscr : Node_Id;
- Atyp : Entity_Id;
Rev_SSO : Node_Id;
begin
@@ -1454,9 +1453,6 @@ package body Exp_Pakd is
-- Now generate the set reference
- Obj := Relocate_Node (Prefix (Lhs));
- Convert_To_Actual_Subtype (Obj);
- Atyp := Etype (Obj);
Compute_Linear_Subscript (Atyp, Lhs, Subscr);
-- Set indication of whether the packed array has reverse SSO