svn merge -r102224:107263 svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-3_4-branch
[official-gcc.git] / gcc / testsuite / gcc.dg / 20000720-1.c
blob92b52fb1d3b7dc1e3c4b383f5f7fe424756167d8
1 /* { dg-do compile { target i?86-*-* } } */
2 /* { dg-options "-mpreferred-stack-boundary=2 -march=i586 -O2 -fomit-frame-pointer" } */
4 extern void *foo(void *a, const void *b, unsigned c);
6 extern inline void *
7 bar(void *a, const void *b, unsigned c)
9 int d0, d1, d2;
10 __asm__ __volatile__(
11 "" :
12 "=&c" (d0), "=&D" (d1), "=&S" (d2) :
13 "0" (c/4), "q" (c), "1" (a), "2" (b) :
14 "memory");
15 return a;
18 typedef struct {
19 unsigned char a;
20 unsigned b : 2;
21 unsigned c : 4;
22 unsigned d : 2;
23 } *baz;
25 static int
26 dead(unsigned short *v, char *w, unsigned char *x, int y, int z)
28 int i = 0;
29 unsigned short j = *v;
31 while (y > 0) {
32 ((baz)x)->a = j;
33 ((baz)x)->b = 0;
34 ((baz)x)->c = 0;
35 ((baz)x)->d = 0;
36 __builtin_constant_p(i) ? foo(x, w, i) : bar(x, w, i);
38 return z - y;