https://gcc.gnu.org/g:8999aba832b3c8789d3bfd5680985bfb77a4df87

commit r15-6150-g8999aba832b3c8789d3bfd5680985bfb77a4df87
Author: Eric Botcazou <ebotca...@adacore.com>
Date:   Wed Nov 20 16:37:30 2024 +0100

    ada: Elide the copy for bit-packed aggregates in allocators
    
    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 allocators from in-place expansion.

Diff:
---
 gcc/ada/exp_aggr.adb | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb
index 37c21ac57629..364af2283592 100644
--- a/gcc/ada/exp_aggr.adb
+++ b/gcc/ada/exp_aggr.adb
@@ -6150,21 +6150,18 @@ package body Exp_Aggr is
          or else (Parent_Kind in N_Aggregate | N_Extension_Aggregate
                    and then not Is_Container_Aggregate (Parent_Node))
 
-         --  Allocator (see Convert_Aggr_In_Allocator). Bit-packed array types
-         --  need specific processing and sliding cannot be done in place for
-         --  the time being.
+         --  Allocator (see Convert_Aggr_In_Allocator). Sliding cannot be done
+         --  in place for the time being.
 
          or else (Nkind (Parent_Node) = N_Allocator
                    and then
                      (Aggr_Assignment_OK_For_Backend (N)
                        or else Is_Limited_Type (Typ)
                        or else Needs_Finalization (Typ)
-                       or else (not Is_Bit_Packed_Array (Typ)
-                                 and then not
-                                   Must_Slide
+                       or else not Must_Slide
                                      (N,
                                       Designated_Type (Etype (Parent_Node)),
-                                      Typ))))
+                                      Typ)))
 
          --  Object declaration (see Convert_Aggr_In_Object_Decl). Bit-packed
          --  array types need specific processing and sliding cannot be done

Reply via email to