OSDN Git Service

Backported from mainline
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.c-torture / compile / 20080124-1.c
1 /* PR middle-end/34934 */
2
3 #include <stdarg.h>
4
5 typedef struct
6 {
7   int e[1024];
8   int f;
9 } S;
10
11 void foo (long *, va_list);
12
13 void
14 bar (long *x, S *y, int z, ...)
15 {
16   int i, j;
17   va_list ap;
18   va_start (ap, z);
19   for (j = y->e[i = 1]; i <= y->f; j = y->e[++i])
20     {
21       switch (z)
22         {
23         case 1:
24           if (!(*x & 0x00000020))
25             continue;
26         case 3:
27           if (!(*x & 0x00000080))
28             continue;
29         case 9:
30           if (!(*x & 0x04000000))
31             continue;
32         case 4:
33           if (!(*x & 0x00000200))
34             continue;
35         case 8:
36           if (!(*x & 0x00100000))
37             continue;
38         case 6:
39           if (!(*x & 0x00000100))
40             continue;
41         case 7:
42           if (!(*x & 0x00040000))
43             continue;
44         case 10:
45           if (!(*x & 0x00000020)
46               && ((*x & 0x00008000) || (*x & 0x08000000)))
47             continue;
48         }
49       foo (x, ap);
50     }
51   va_end (ap);
52 }