]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Elide the copy for bit-packed aggregates in (safe) assignments
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 17 Dec 2024 10:20:03 +0000 (11:20 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Tue, 7 Jan 2025 12:33:33 +0000 (13:33 +0100)
The in-place expansion has been historically disabled for them, but there
does not seem to be any good reason left for this.

gcc/ada/ChangeLog:

* exp_aggr.adb (Expand_Array_Aggregate): Do not exclude aggregates
of bit-packed array types in assignments from in-place expansion.

gcc/ada/exp_aggr.adb

index f771660d23a0d21c4a6073af13baa9b30a79e7e0..a51e02bc3082f6f24f622fabf75e37e88a9baa03 100644 (file)
@@ -6129,7 +6129,6 @@ package body Exp_Aggr is
         Nkind (Parent_Node) = N_Assignment_Statement
           and then (Is_Limited_Type (Typ)
                      or else (not Has_Default_Init_Comps (N)
-                               and then not Is_Bit_Packed_Array (Typ)
                                and then
                                  In_Place_Assign_OK
                                    (N, Get_Base_Object (Name (Parent_Node)))));