This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/32500] [4.2 Regression] Loop optimization limits range to size of array used inside loop



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]