Rewriting of boxes in record aggregates into the corresponding default values was done in resolution, where we special-cased access types and scalar types with a Default_Value aspect. However, this rewriting rather belong to expansion. Also, the special-casing didn't take Normalize_Scalars nor Initialize_Scalars pragmas into account and it didn't work for private types. Now the resolution keeps boxes that require simple initialization, while expansion reuses existing routines for initialization of record types. Tested on x86_64-pc-linux-gnu, committed on trunk 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.