This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
categorize_ctor_elements/nc_elts vs initializer_constant_valid_p
- From: Olivier Hainque <hainque at adacore dot com>
- To: gcc at gcc dot gnu dot org
- Cc: hainque at adacore dot com
- Date: Sat, 25 Mar 2006 08:58:28 +0100
- Subject: categorize_ctor_elements/nc_elts vs initializer_constant_valid_p
Hello all,
>From a call like
categorize_ctor_elements (ctor, &num_nonzero_elements,
&num_nonconstant_elements,
is 'num_nonconstant_elements == 0' expected to convey the same as
initializer_constant_valid_p (ctor, TREE_TYPE (ctor)) ?
The code in gimplify_init_constructor apparently assumes so and it is
currently not true for a number of cases exposed in Ada.
This results in the promotion/copy of !valip_p constructors into
static storage, which triggers spurious 'invalid initial value for
member' errors out of output_constructor.
Thanks in advance for your help,
Olivier