1 /* { dg-do compile } */
2 /* { dg-options "-O3 -Warray-bounds" } */
3
4 int foo(unsigned order)
5 {
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" } */
12 }
13 }
14 return c[0];
15 }