* Mainline merge as of 2006-02-16 (@111136).
[official-gcc.git] / gcc / testsuite / gcc.c-torture / compile / 20060215-1.c
blob7979561a3e6900ffdc920c7f767bbde3e15ecd4c
1 /* PR middle-end/26300 */
3 struct S
5 char c;
6 struct S *d;
7 struct S *e;
8 };
9 extern struct S *u, *v;
10 extern void fn1 (struct S *) __attribute__ ((noreturn));
11 void fn2 (struct S *);
13 static inline struct S *
14 fn3 (struct S *x)
16 if (x->c != 6)
17 fn1 (0);
18 return (struct S *) x;
21 static inline int
22 fn4 (struct S *x)
24 if (x != u)
25 return 3;
26 fn2 (x);
27 return 0;
30 int
31 test (struct S *x)
33 struct S *r;
34 int m = 0;
36 for (r = x; r != v; r = (fn3 (r)->d))
37 if (r->c != 6)
38 fn1 (x);
39 else
40 m |= 1 << (fn4 (fn3 (r)->e) - 1);
41 return m;