Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.dg / pr51721.c
blobb39adfb50c2a27f296fc1c21d014590d9de76348
1 /* PR tree-optimization/51721 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -Warray-bounds" } */
5 static int a[10], b[10], c[10], d[10];
7 unsigned int
8 f (unsigned int v)
10 return v == 17 ? 11 : v;
13 unsigned int
14 g (unsigned int v)
16 return v == 17 ? 17 : v;
19 void
20 t (unsigned int s)
22 if (s >> 1 == 0)
24 a[f (s)] = 0; /* { dg-bogus "array subscript is above array bounds" } */
25 a[f (s)] = 0; /* { dg-bogus "array subscript is above array bounds" } */
26 b[f (s)] = 0; /* { dg-bogus "array subscript is above array bounds" } */
27 c[g (s)] = 0; /* { dg-bogus "array subscript is above array bounds" } */
28 c[g (s)] = 0; /* { dg-bogus "array subscript is above array bounds" } */
29 d[f (s)] = 0; /* { dg-bogus "array subscript is above array bounds" } */