This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]