From gcc.dg/vect/no-scevccp-noreassoc-outer-2.c: 6 #define N 40 7 int a[200*N]; 8 9 __attribute__ ((noinline)) void 10 foo (){ 11 int i,j; 12 int sum,s=0; 13 14 for (i = 0; i < 200*N; i++) { 15 sum = 0; 16 for (j = 0; j < N; j++) { 17 sum += (i + j); 18 i++; 19 } 20 a[i] = sum; // i exceeds 8000, runs off array end 21 } 22 } In function foo(), at line 20, variable 'i' can exceed the bounds of array 'a', and segv is possible. The fix may be as simple as padding array 'a', provided this does not affect the other things that this test validates.
Committed revision 150109.
Subject: Bug 40829 Author: hjl Date: Tue Jul 28 16:51:19 2009 New Revision: 150169 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150169 Log: 2009-07-28 H.J. Lu <hongjiu.lu@intel.com> Backport from mainline: 2009-07-27 Janus Weil <janus@gcc.gnu.org> PR fortran/40848 * gfortran.dg/altreturn_7.f90: New. 2009-07-27 Simon Baldwin <simonb@google.com> PR testsuite/40829 * gcc.dg/vect/no-scevccp-noreassoc-outer-2.c: Extended array 'a' so that indexing no longer runs off array end. 2009-07-24 Janus Weil <janus@gcc.gnu.org> PR fortran/40822 * gfortran.dg/char_length_16.f90: New. Added: branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/altreturn_7.f90 - copied unchanged from r150168, trunk/gcc/testsuite/gfortran.dg/altreturn_7.f90 branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/char_length_16.f90 - copied unchanged from r150168, trunk/gcc/testsuite/gfortran.dg/char_length_16.f90 Modified: branches/gcc-4_4-branch/gcc/testsuite/ChangeLog branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/vect/no-scevccp-noreassoc-outer-2.c