This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/32546] 'warning: array subscript is above/below array bounds' on delete[]
- From: "mueller at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jul 2007 11:05:25 -0000
- Subject: [Bug middle-end/32546] 'warning: array subscript is above/below array bounds' on delete[]
- References: <bug-32546-14599@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from mueller at gcc dot gnu dot org 2007-07-13 11:05 -------
this is yet another case of the middle end folding memory arithmetics back into
an array ref that is out of bounds:
operator delete [] ((void *) A + 0xfffffffffffffffc);
(from orig dump)
later it is:
D.2607_30 = &(*D.2517_7)[-4];
operator delete [] (D.2607_30);
which will then trigger this warning (because -4 is clearly out of bounds).
--
mueller at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-07-13 11:05:25
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32546