Fix unused warnings.
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.c-torture / compile / 20011130-2.c
blobe3cb5f46a88771aa74a65295aefd081593b7ea31
1 /* This testcase caused infinite loop in life info computation
2 after if conversion on IA-64. Conditional register dead for
3 pseudo holding sign-extended k was improperly computed,
4 resulting in this pseudo being live at start of bb if it was
5 dead at the end and vice versa; as it was a bb which had edge
6 to itself, this resulted in alternative propagating this basic
7 block forever. */
9 typedef struct {
10 unsigned char a;
11 unsigned char b;
12 } S0;
14 typedef struct {
15 S0 *c;
16 int d;
17 unsigned int e;
18 unsigned char *f[3];
19 void *g;
20 } S1;
22 int bar (int, void *);
24 int foo (S1 *x, float y)
26 S0 *h;
27 int i, j, k, l, m;
28 float n, o, p;
29 unsigned char *q, *r[3];
31 h = x->c;
32 m = h->a;
33 l = h->b;
34 n = y;
35 o = 0.0;
36 if (x->d == 8)
37 for (j = 0; j < x->e; j++)
38 for (k = 0; k < 3; k++)
40 n = y;
41 o = 0.0;
42 if (m)
43 q = x->f[k] + x->e - 1 - j;
44 else
45 q = x->f[k] + j;
46 p = (*q - o) * y / (n - o);
47 p = 0.0 > p ? 0.0 : p;
48 p = y < p ? y : p;
49 if (l)
50 p = r[k][(int) p];
51 bar (p, x->g);
53 return 1;