From: Eric Botcazou <ebotca...@adacore.com>

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.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 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 37c21ac5762..364af228359 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
-- 
2.43.0

Reply via email to