Aldy Hernandez wrote:
> (Frustratingly, max_index above yields false on integer_all_onesp(), but
> we can tackle that once we can agree what to do here.)
>
> Is it ok to special case max_index being -1?
Definitely.
This problem appears in various places; we represent array bounds using
a number
More questions wrt this PR.
The problem here is in reshape_init_array_1. Ever since we made
max_index_cst and index *unsigned* HOST_WIDE_INT, we are causing the
loop over initializers to wrongly iterate when we have zero sized arrays.
Since on a zero sized array, we have "tree max_index" set to: