diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2025-01-24 10:26:13 +0100 |
---|---|---|
committer | Eric Botcazou <ebotcazou@adacore.com> | 2025-06-05 15:39:27 +0200 |
commit | b7e10f86d5cbd95ac38a1141f3e0a95424ede281 (patch) | |
tree | 1a331ede93724c67f5be592c3510ecdbe1aa9a51 /gcc/tree-ssa-phiopt.cc | |
parent | 9f9476c195e4234f2bda930b5adee7d18d43d34e (diff) | |
download | gcc-b7e10f86d5cbd95ac38a1141f3e0a95424ede281.zip gcc-b7e10f86d5cbd95ac38a1141f3e0a95424ede281.tar.gz gcc-b7e10f86d5cbd95ac38a1141f3e0a95424ede281.tar.bz2 |
ada: Implement built-in-place expansion of two-pass array aggregates
These are array aggregates containing only component associations that are
iterated with iterator specifications, as per RM 4.3.3(20.2/5-20.4/5).
It is implemented for the array 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 (Build_Two_Pass_Aggr_Code): New function containing
most of the code initially present in Two_Pass_Aggregate_Expansion.
(Two_Pass_Aggregate_Expansion): Remove redundant N parameter.
Implement built-in-place expansion for (static) object declarations
and allocators, using Build_Two_Pass_Aggr_Code for the main work.
(Expand_Array_Aggregate): Adjust Two_Pass_Aggregate_Expansion call.
Replace Etype (N) by Typ in a couple of places.
* exp_ch3.adb (Expand_Freeze_Array_Type): Remove special case for
two-pass array aggregates.
(Expand_N_Object_Declaration): Do not adjust the object when it is
initialized by a two-pass array aggregate.
* exp_ch4.adb (Expand_Allocator_Expression): Apply the processing
used for container aggregates to two-pass array aggregates.
* exp_ch6.adb (Validate_Subprogram_Calls): Skip calls present in
initialization expressions of N_Object_Declaration nodes that have
No_Initialization set.
* sem_ch3.adb (Analyze_Object_Declaration): Detect the cases of an
array originally initialized by an aggregate consistently.
Diffstat (limited to 'gcc/tree-ssa-phiopt.cc')
0 files changed, 0 insertions, 0 deletions