If the Default_Component_Value aspect is specified for an array type, then
specifying Initialize_Scalars or Normalize_Scalars should have no effect
on the default initialization of an object of the array type.
gcc/ada/
* exp_ch3.adb
(Expand_N_Object_Declaration.Default_Initialize_Object): Add test for
specified Default_Component_Value aspect when deciding whether
either Initialize_Scalars or Normalize_Scalars impacts default
initialization of an array object.
and then not Has_Predicates (Component_Type (Typ))
+ -- Array default component value takes precedence over
+ -- Init_Or_Norm_Scalars.
+
+ and then No (Find_Aspect (Typ,
+ Aspect_Default_Component_Value))
+
-- The component type must have a single initialization value
and then Simple_Initialization_OK (Component_Type (Typ))