ada: Default_Component_Value trumps Initialize/Normalize_Scalars
commit603c253d2698a586f5fa55acd25deb2bc8bd6e4f
authorSteve Baird <baird@adacore.com>
Thu, 30 Mar 2023 20:22:01 +0000 (30 13:22 -0700)
committerMarc Poulhiès <poulhies@adacore.com>
Mon, 29 May 2023 08:23:19 +0000 (29 10:23 +0200)
tree0c6f1346b2a59bb3650ec9e2ee51ca9e2a7e0055
parent265c571daa41fdf4d21e06c55703f65ec9aad8c4
ada: Default_Component_Value trumps Initialize/Normalize_Scalars

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.
gcc/ada/exp_ch3.adb