1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
/* { dg-do compile } */
/* { dg-options "-O1" } */
int *ptr;
int *fn1 (int *);
int fn2 (int, int);
int fn3 (void);
int fn4 (int);
static int
foo (int x, int y, int z)
{
int b;
asm ("" : "=a" (b), "=&d" (x) : "0" (y), "1" (x), "mr" (z));
return x;
}
static int
bar (int x, int y)
{
int a;
if (!y)
{
for (a = 0; a <= (x >> 1); )
;
a = foo (y, fn2 (2, x), x);
if (x)
a = x;
return a;
}
}
static int
baz (int x, int y)
{
int *a = ptr;
int t, xk1 = fn3 (), xk = x * xk1;
for (t = 0; t < xk; t += xk1)
{
if (fn4 (a[2]))
return -y;
a = fn1 (a);
}
return 0;
}
void
test (int x, long y, int z)
{
int a = fn3 ();
int b;
int c = bar (x, z);
for (b = 0; b <= y; b++)
c = baz (x, c);
fn2 (c, a);
}
|