diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2024-10-18 12:06:23 +0200 |
---|---|---|
committer | Marc Poulhiès <dkm@gcc.gnu.org> | 2024-11-12 14:00:46 +0100 |
commit | b30440436fcae4fd0b7237a7ade312b5e7165f5c (patch) | |
tree | 554e385b45686ae2810e5afec9d2bc3d2c0765b4 /gcc/ada/raise-gcc.c | |
parent | a5a0d605d8b86156e4e088e64aea16d80655a1a2 (diff) | |
download | gcc-b30440436fcae4fd0b7237a7ade312b5e7165f5c.zip gcc-b30440436fcae4fd0b7237a7ade312b5e7165f5c.tar.gz gcc-b30440436fcae4fd0b7237a7ade312b5e7165f5c.tar.bz2 |
ada: Implement built-in-place expansion of container aggregates
It is implemented for container aggregates that are used to initialize an
object, as specified by RM 7.6(17.2/3-17.3/3) for immutably limited types
and types that need finalization, but for all types like other aggregates.
gcc/ada/ChangeLog:
* exp_aggr.adb (Expand_Delta_Array_Aggregate): Move declaration.
(Expand_Delta_Record_Aggregate): Likewise.
(Expand_Container_Aggregate): Likewise. Move implementation to
Build_Container_Aggr_Code. Implement built-in-place expansion
for object declarations and allocators.
(Build_Container_Aggr_Code): New function containing most of the
code of the original Expand_Container_Aggregate. Do not build a
temporary for the size calculation. Minor formatting tweaks.
(Expand_N_Aggregate): Add comment.
* exp_ch4.adb (Expand_Allocator_Expression): Detect the case of
a container aggregate as qualified expression. Do not apply the
predicate check on entry in this case and rewrite the allocator.
* exp_ch7.adb (Build_Finalizer.Process_Object_Declaration): Deal
with Last_Aggregate_Assignment first to compute the attachment
point (as already done in Attach_Object_To_Master_Node).
Diffstat (limited to 'gcc/ada/raise-gcc.c')
0 files changed, 0 insertions, 0 deletions