From a47c6d8a1e4ec4fc635bbe9f9fadfc871b13bae2 Mon Sep 17 00:00:00 2001
From: Eric Botcazou <ebotcazou@adacore.com>
Date: Tue, 17 Dec 2024 11:20:03 +0100
Subject: [PATCH] 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.
---
 gcc/ada/exp_aggr.adb | 1 -
 1 file changed, 1 deletion(-)

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)))));
-- 
GitLab