From patchwork Fri Aug 27 11:36:26 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: More out-of-bounds array accesses From: Richard Guenther X-Patchwork-Id: 62849 Message-Id: To: gcc-patches@gcc.gnu.org Date: Fri, 27 Aug 2010 13:36:26 +0200 (CEST) ... There are appearantly also some here (but I'm not 100% sure) FAIL: 25_algorithms/heap/1.cc execution test FAIL: 25_algorithms/stable_partition/mem_check.cc execution test FAIL: 25_algorithms/stable_sort/mem_check.cc execution test and there's definitely some here (but I can't wrap my brain around how to fix that) FAIL: gcc.target/x86_64/abi/test_passing_structs.c execution, -O2 FAIL: gcc.target/x86_64/abi/test_passing_unions.c execution, -O2 Richard. 2010-08-27 Richard Guenther * gcc.dg/graphite/scop-1.c: Fix out-of-bound array accesses. * gcc.dg/graphite/scop-2.c: Likewise. * gcc.dg/graphite/scop-20.c: Likewise. * gcc.dg/vect/slp-25.c: Likewise. Index: gcc/testsuite/gcc.dg/graphite/scop-1.c =================================================================== --- gcc/testsuite/gcc.dg/graphite/scop-1.c (revision 163563) +++ gcc/testsuite/gcc.dg/graphite/scop-1.c (working copy) @@ -3,7 +3,7 @@ void bar (void); int toto() { int i, j, k; - int a[100][100]; + int a[101][100]; int b[100]; for (i = 1; i < 100; i++) Index: gcc/testsuite/gcc.dg/graphite/scop-2.c =================================================================== --- gcc/testsuite/gcc.dg/graphite/scop-2.c (revision 163563) +++ gcc/testsuite/gcc.dg/graphite/scop-2.c (working copy) @@ -3,7 +3,7 @@ void bar (void); int toto() { int i, j, k; - int a[100][100]; + int a[101][100]; int b[100]; for (i = 1; i < 100; i++) Index: gcc/testsuite/gcc.dg/graphite/scop-20.c =================================================================== --- gcc/testsuite/gcc.dg/graphite/scop-20.c (revision 163563) +++ gcc/testsuite/gcc.dg/graphite/scop-20.c (working copy) @@ -3,7 +3,7 @@ void bar (void); int toto() { int i, j, k; - int a[100][100]; + int a[101][100]; int b[100]; for (i = 1; i < 100; i++) Index: gcc/testsuite/gcc.dg/vect/slp-25.c =================================================================== --- gcc/testsuite/gcc.dg/vect/slp-25.c (revision 163563) +++ gcc/testsuite/gcc.dg/vect/slp-25.c (working copy) @@ -7,8 +7,8 @@ /* Unaligned stores. */ -int ia[N+1]; -short sa[N+1]; +int ia[N+2]; +short sa[N+2]; int main1 (int n) {