remove unused files
[platform/upstream/gcc48.git] / gcc / testsuite / gcc.dg / pr51721.c
1 /* PR tree-optimization/51721 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -Warray-bounds" } */
4
5 static int a[10], b[10], c[10], d[10];
6
7 unsigned int
8 f (unsigned int v)
9 {
10   return v == 17 ? 11 : v;
11 }
12
13 unsigned int
14 g (unsigned int v)
15 {
16   return v == 17 ? 17 : v;
17 }
18
19 void
20 t (unsigned int s)
21 {
22   if (s >> 1 == 0)
23     {
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" } */
30     }
31 }