Fix static array size in gcc.dg/vect/vect-simd-20.c 10000 / 78 is a strictly greater than 128 so we will actually do 128+1 strides in foo() for s == 78 and p[] needs to be dimensioned accordingly. 2021-11-02 Olivier Hainque * gcc.dg/vect/vect-simd-20.c: Fix size of p[] to accommodate the number of strides performed by foo() for s == 78. diff --git a/gcc/testsuite/gcc.dg/vect/vect-simd-20.c b/gcc/testsuite/gcc.dg/vect/vect-simd-20.c index c85f05f61c6..8d8d8378484 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-simd-20.c +++ b/gcc/testsuite/gcc.dg/vect/vect-simd-20.c @@ -18,7 +18,10 @@ foo (int s, int m, int n, int *p) return r; } -int p[10000 / 78 * 7]; +/* Dimension this static array in accordance with the maximum number + of inner strides we might do in foo(). This will be for s == 78, + and 10000 % 78 > 0. */ +int p[((10000 / 78) + 1) * 7]; int main ()