diff options
Diffstat (limited to 'gcc/ada/sem_aggr.adb')
-rw-r--r-- | gcc/ada/sem_aggr.adb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb index 03930f5e3cf..374bb7b9081 100644 --- a/gcc/ada/sem_aggr.adb +++ b/gcc/ada/sem_aggr.adb @@ -4204,6 +4204,17 @@ package body Sem_Aggr is end; end if; + -- Ada 2012: If component is scalar with default value, use it + + elsif Is_Scalar_Type (Ctyp) + and then Has_Default_Aspect (Ctyp) + then + Add_Association + (Component => Component, + Expr => Default_Aspect_Value + (First_Subtype (Underlying_Type (Ctyp))), + Assoc_List => New_Assoc_List); + elsif Has_Non_Null_Base_Init_Proc (Ctyp) or else not Expander_Active then |