Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / Warray-bounds-24.c
blob35631737647fe854e3406cc6fa57a15ee2663692
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -Warray-bounds" } */
4 int foo(unsigned order)
6 int c[3] = {1, 2, 3};
7 unsigned i, j;
8 for (i = 1; i < order; i++) {
9 for (j = 0; j < i / 2; j++) {
10 c[j] += c[i] * c[i-j-1]; /* { dg-bogus "array bounds" } */
11 c[i-j-1] += c[i] * c[j]; /* { dg-bogus "array bounds" } */
14 return c[0];