[Ada] Move rewriting of boxes in aggregates from resolution to expansion
authorPiotr Trojanek <trojanek@adacore.com>
Wed, 29 Sep 2021 17:51:33 +0000 (19:51 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 11 Oct 2021 13:38:10 +0000 (13:38 +0000)
commit736f9bed34c0420063c3c01b520099711040d345
tree04a4c86a4310cb786ef985599c6c33d2eaafefe7
parent1bafcab05cbff1cc98e3ca867b4474401eec729b
[Ada] Move rewriting of boxes in aggregates from resolution to expansion

gcc/ada/

* exp_aggr.adb (Initialize_Record_Component): Add assertion
about one of the parameters, so that illegal attempts to
initialize record components with Empty node are detected early
on.
(Build_Record_Aggr_Code): Handle boxes in aggregate component
associations just the components with no initialization in
Build_Record_Init_Proc.
* sem_aggr.adb (Resolve_Record_Aggregate): For components that
require simple initialization carry boxes from resolution to
expansion.
* sem_util.adb (Needs_Simple_Initialization): Remove redundant
paren.
gcc/ada/exp_aggr.adb
gcc/ada/sem_aggr.adb
gcc/ada/sem_util.adb