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 of the same precision as the set of valid indices, so edge-case representations require a little special handling. (Of course, that whole function is busted if we get an array of a size that can't be represented in a HOST_WIDE_INT, but that's not your problem...) -- Mark Mitchell CodeSourcery, LLC [EMAIL PROTECTED] (916) 791-8304