Rebase.
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr55775.c
blob1902f688324d50929afcd02c5867db4c7100df25
1 /* { dg-do compile } */
2 /* { dg-options "-O1" } */
4 int *ptr;
5 int *fn1 (int *);
6 int fn2 (int, int);
7 int fn3 (void);
8 int fn4 (int);
10 static int
11 foo (int x, int y, int z)
13 int b;
14 asm ("" : "=a" (b), "=&d" (x) : "0" (y), "1" (x), "mr" (z));
15 return x;
18 static int
19 bar (int x, int y)
21 int a;
22 if (!y)
24 for (a = 0; a <= (x >> 1); )
26 a = foo (y, fn2 (2, x), x);
27 if (x)
28 a = x;
29 return a;
33 static int
34 baz (int x, int y)
36 int *a = ptr;
37 int t, xk1 = fn3 (), xk = x * xk1;
38 for (t = 0; t < xk; t += xk1)
40 if (fn4 (a[2]))
41 return -y;
42 a = fn1 (a);
44 return 0;
47 void
48 test (int x, long y, int z)
50 int a = fn3 ();
51 int b;
52 int c = bar (x, z);
53 for (b = 0; b <= y; b++)
54 c = baz (x, c);
55 fn2 (c, a);