[Bug tree-optimization/32500] [4.2 Regression] Loop optimization limits range to size of array used inside loop
ed at fxq dot nl
gcc-bugzilla@gcc.gnu.org
Wed Jul 4 17:35:00 GMT 2007
------- 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
More information about the Gcc-bugs
mailing list