]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Further cleanup in expansion of array aggregates in allocators
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 5 Nov 2024 14:46:45 +0000 (15:46 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Mon, 18 Nov 2024 14:06:54 +0000 (15:06 +0100)
commit7617b83242b19efa2216eb817befb53b75a6794c
tree06b42e4b4d6647ad06bc7425ef39a089d8da5046
parent856467a7e6d2d24d8816b2036ae5fd52c3e91145
ada: Further cleanup in expansion of array aggregates in allocators

This mainly decouples the handling of the allocator case from that of the
assignment case in Expand_Array_Aggregate and also makes Must_Slide a bit
more forgiving.

gcc/ada/ChangeLog:

* exp_aggr.adb (In_Place_Assign_OK): Remove handling of allocators
and call Must_Slide instead of implementing the check manually.
(Convert_To_Assignments): Adjust outdated comment.
(Expand_Array_Aggregate): Move handling of allocator case to STEP 3
and call Must_Slide directly for it.
(Must_Slide): Replace tests based on Is_OK_Static_Expression with
tests based on Compile_Time_Known_Value.
gcc/ada/exp_aggr.adb