This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix testcase for PR tree-optimization/32500
- From: Volker Reichelt <v dot reichelt at netcologne dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 30 Oct 2007 08:24:49 +0100 (CET)
- Subject: [PATCH] Fix testcase for PR tree-optimization/32500
Hi,
the submitter of PR32500 noted that the testcase that was added to the
testsuite is broken: It contains an out-of-bounds array access.
He suggested the trivial fix attached below.
Bootstrapped and regtested by me on i686-pc-linux-gnu.
Ok for mainline and 4.2 branch?
Regards,
Volker
:ADDPATCH tree-optimization:
2007-10-29 Ed Schouten <ed@fxq.nl>
PR tree-optimization/32500
* gcc.c-torture/execute/pr32500.c: Fix buffer overflow in testcase.
===========================================================================
--- gcc/gcc/testsuite/gcc.c-torture/execute/pr32500.c 2007-07-05 22:47:04 +0200
+++ gcc/gcc/testsuite/gcc.c-torture/execute/pr32500.c 2007-09-18 03:12:13 +0200
@@ -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();
}
===========================================================================