[Ada] Ada2022: implementation of AI12-0212 : iterator specs in array aggregates
authorEd Schonberg <schonberg@adacore.com>
Tue, 27 Jul 2021 14:55:07 +0000 (10:55 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 23 Sep 2021 13:06:15 +0000 (13:06 +0000)
commitfe43084ca31636ee5c997cc9c37f88e71a59293c
tree904051d08f02dec75716fb8f7d22cf7312c2f551
parentc06539752d77126689ee49fc3e4a8add2a4980e3
[Ada] Ada2022: implementation of AI12-0212 : iterator specs in array aggregates

gcc/ada/

* sem_aggr.adb (Resolve_Array_Aggregate): Check the validity of
an array aggregate all of whose components are iterated
component associations.
* exp_aggr.adb (Expand_Array_Aggregate,
Two_Pass_Aggregate_Expansion): implement two-pass algorithm and
replace original aggregate with resulting temporary, to ensure
that a proper length check is performed if context is
constrained. Use attributes Pos and Val to handle index types of
any discrete type.
gcc/ada/exp_aggr.adb
gcc/ada/sem_aggr.adb