This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/32500] [4.2 Regression] Loop optimization limits range to size of array used inside loop
- From: "ed at fxq dot nl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Jul 2007 17:35:40 -0000
- Subject: [Bug tree-optimization/32500] [4.2 Regression] Loop optimization limits range to size of array used inside loop
- References: <bug-32500-14753@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #17 from ed at fxq dot nl 2007-07-04 17:35 -------
Sorry if I'm being a nitpick...
The committed testcase contains a small error; it has an off-by-one bug that
causes a small buffer overflow.
The line:
foo(numbers[i]);
should be replaced with:
foo(numbers[i - 1]);
It shouldn't cause any real problems, because it's just a testcase, but maybe
some quite intelligent new optimizer might trip on that.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32500