[Ada] Additional fixes for Default_Initial_Condition
authorGary Dismukes <dismukes@adacore.com>
Wed, 18 Nov 2020 23:06:14 +0000 (18:06 -0500)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 14 Dec 2020 15:51:51 +0000 (10:51 -0500)
commit097826df0cb9333f06bc857a1c02a8842d0de7fd
tree5a7948c7fcd7334f453b3fbd6356e209a16e4dc5
parent32543637450cd686a193fafc681501e930b66088
[Ada] Additional fixes for Default_Initial_Condition

gcc/ada/

* exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Move
generation of the call for DIC check past the optional
generation of calls to controlled Initialize procedures.
* exp_ch3.adb
(Build_Array_Init_Proc.Init_One_Dimension.Possible_DIC_Call):
Suppress generation of a DIC call when the array component type
is controlled.  The call will now be generated later inside the
array's DI (Deep_Initialize) procedure.
* exp_ch7.adb
(Make_Deep_Array_Body.Build_Initialize_Statements): Generate a
DIC call (when needed by the array component type) after any
call to the component type's controlled Initialize procedure, or
generate the DIC call by itself if there's no Initialize to
call.
* sem_aggr.adb (Resolve_Record_Aggregate.Add_Association):
Simplify condition to only test Is_Box_Init_By_Default (previous
condition was overkill, as well as incorrect in some cases).
* sem_elab.adb (Active_Scenarios.Output_Call): For
Default_Initial_Condition, suppress call to
Output_Verification_Call when the subprogram is a partial DIC
procedure.
gcc/ada/exp_aggr.adb
gcc/ada/exp_ch3.adb
gcc/ada/exp_ch7.adb
gcc/ada/sem_aggr.adb
gcc/ada/sem_elab.adb