(complete_array_type): Make maxindex -1 for empty constructor.
From-SVN: r4417
{
register int nelts
= list_length (CONSTRUCTOR_ELTS (initial_value));
- maxindex = build_int_2 (nelts - 1, 0);
+ maxindex = build_int_2 (nelts - 1, - (nelts == 0));
}
else
{
if (maxindex)
{
+ tree main;
TYPE_DOMAIN (type) = build_index_type (maxindex);
if (!TREE_TYPE (maxindex))
TREE_TYPE (maxindex) = TYPE_DOMAIN (type);
+ change_main_variant (type,
+ build_array_type (TREE_TYPE (type),
+ TYPE_DOMAIN (type)));
}
/* Lay out the type now that we can get the real answer. */