1/* { dg-do compile } */
2/* { dg-require-effective-target ilp32 } */
3/* { dg-options "-mpreferred-stack-boundary=2 -march=i586 -O2 -fomit-frame-pointer" } */
4
5extern void *foo(void *a, const void *b, unsigned c);
6
7extern inline void *
8bar(void *a, const void *b, unsigned c)
9{
10  int d0, d1, d2;
11  __asm__ __volatile__(
12    "" :
13    "=&c" (d0), "=&D" (d1), "=&S" (d2) :
14    "0" (c/4), "q" (c), "1" (a), "2" (b) :
15    "memory");
16  return a;
17}
18
19typedef struct {
20  unsigned char a;
21  unsigned b : 2;
22  unsigned c : 4;
23  unsigned d : 2;
24} *baz;
25
26static int
27dead(unsigned short *v, char *w, unsigned char *x, int y, int z)
28{
29  int i = 0;
30  unsigned short j = *v;
31
32  while (y > 0) {
33    ((baz)x)->a = j;
34    ((baz)x)->b = 0;
35    ((baz)x)->c = 0;
36    ((baz)x)->d = 0;
37    __builtin_constant_p(i) ? foo(x, w, i) : bar(x, w, i);
38  }
39  return z - y;
40}
41