[Ada] Ongoing work for AI12-0212: container aggregates
authorArnaud Charlet <charlet@adacore.com>
Wed, 3 Jun 2020 07:42:19 +0000 (03:42 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 15 Jul 2020 13:43:00 +0000 (09:43 -0400)
commit8092c19930b6cdf3087825f9063cb830cd2de479
tree65d79907beeb22253433c45c9b4976287b039ccb
parent1c5f82019ab50806ff1a23e5be8db864e8da131a
[Ada] Ongoing work for AI12-0212: container aggregates

gcc/ada/

* par-ch4.adb (P_Iterated_Component_Association): Extended to
recognzize the similar Iterated_Element_Association. This node
is only generated when an explicit Key_Expression is given.
Otherwise the distinction between the two iterated forms is done
during semantic analysis.
* sinfo.ads: New node N_Iterated_Element_Association, for
Ada202x container aggregates.  New field Key_Expression.
* sinfo.adb: Subprograms for new node and newn field.
* sem_aggr.adb (Resolve_Iterated_Component_Association): Handle
the case where the Iteration_Scheme is an
Iterator_Specification.
* exp_aggr.adb (Wxpand_Iterated_Component): Handle a component
with an Iterated_Component_Association, generate proper loop
using given Iterator_Specification.
* exp_util.adb (Insert_Axtions): Handle new node as other
aggregate components.
* sem.adb, sprint.adb: Handle new node.
* tbuild.adb (Make_Implicit_Loop_Statement): Handle properly a
loop with an Iterator_ specification.
gcc/ada/exp_aggr.adb
gcc/ada/exp_util.adb
gcc/ada/par-ch4.adb
gcc/ada/sem.adb
gcc/ada/sem_aggr.adb
gcc/ada/sinfo.adb
gcc/ada/sinfo.ads
gcc/ada/sprint.adb
gcc/ada/tbuild.adb