re PR tree-optimization/32500 (Loop optimization limits range to size of array used...
authorEd Schouten <ed@fxq.nl>
Tue, 30 Oct 2007 20:30:47 +0000 (21:30 +0100)
committerVolker Reichelt <reichelt@gcc.gnu.org>
Tue, 30 Oct 2007 20:30:47 +0000 (20:30 +0000)
PR tree-optimization/32500
* gcc.c-torture/execute/pr32500.c: Fix buffer overflow in testcase.

From-SVN: r129781

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/pr32500.c

index 9e385c4..4e52b0b 100644 (file)
@@ -1,3 +1,8 @@
+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>
 
        PR c++/31993
index dae06ea..41c455e 100644 (file)
@@ -16,7 +16,7 @@ main(int argc, char *argv[])
 
        for (i = 1; i <= 12; i++) {
                if (i <= 4)
-                       foo(numbers[i]);
+                       foo(numbers[i-1]);
                else if (i >= 7 && i <= 9)
                        bar();
        }