Commit 7e79298c by Ed Schouten Committed by Volker Reichelt

re PR tree-optimization/32500 (Loop optimization limits range to size of array used inside loop)

	PR tree-optimization/32500
	* gcc.c-torture/execute/pr32500.c: Fix buffer overflow in testcase.

From-SVN: r129781
parent 26796ffd
2007-10-30 Ed Schouten <ed@fxq.nl>
PR tree-optimization/32500
* gcc.c-torture/execute/pr32500.c: Fix buffer overflow in testcase.
2007-10-30 Douglas Gregor <doug.gregor@gmail.com> 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
PR c++/31993 PR c++/31993
...@@ -16,7 +16,7 @@ main(int argc, char *argv[]) ...@@ -16,7 +16,7 @@ main(int argc, char *argv[])
for (i = 1; i <= 12; i++) { for (i = 1; i <= 12; i++) {
if (i <= 4) if (i <= 4)
foo(numbers[i]); foo(numbers[i-1]);
else if (i >= 7 && i <= 9) else if (i >= 7 && i <= 9)
bar(); bar();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment