This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/56474] [4.8 regression] bogus Storage_Error raised for record containing empty zero-based array
- From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 04 Mar 2013 15:38:53 +0000
- Subject: [Bug middle-end/56474] [4.8 regression] bogus Storage_Error raised for record containing empty zero-based array
- Auto-submitted: auto-generated
- References: <bug-56474-4@http.gcc.gnu.org/bugzilla/>
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.