http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56474
--- Comment #10 from rguenther at suse dot de <rguenther at suse dot de> 2013-03-04 15:45:09 UTC --- On Mon, 4 Mar 2013, ebotcazou at gcc dot gnu.org wrote: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56474 > > --- Comment #9 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2013-03-04 > 15:38:53 UTC --- > > Hm, if hb < lb - what kind of pair do you expect? The only case > > where lb - 1 is the "upper bound" (whatever upper bound is for an > > empty array ...) - isn't lb - 1 always equal to hb in that case, > > thus are not hb and lb one element apart for empty arrays (length == 0)? > > No, you can have "superflat" arrays and they need to have zero length (instead > of a negative one) in Ada, hence the formula. Btw, it's easy to not get the overflow for this formula by using fold_build2 instead of size_binop.