From: Eric Botcazou Date: Tue, 17 Dec 2024 10:20:03 +0000 (+0100) Subject: ada: Elide the copy for bit-packed aggregates in (safe) assignments X-Git-Tag: basepoints/gcc-16~2926 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a47c6d8a1e4ec4fc635bbe9f9fadfc871b13bae2;p=thirdparty%2Fgcc.git ada: Elide the copy for bit-packed aggregates in (safe) assignments 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. --- diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index f771660d23a0..a51e02bc3082 100644 --- a/gcc/ada/exp_aggr.adb +++ b/gcc/ada/exp_aggr.adb @@ -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)))));