1 /* PR target/39423 */
2 
3 typedef unsigned short uint16_t;
4 
5 typedef struct
6 {
7   short x, y;
8 } P;
9 
10 typedef struct
11 {
12   uint16_t w, h;
13 } D;
14 
15 typedef struct
16 {
17   P p;
18   D s;
19 } A;
20 
21 typedef struct
22 {
23   uint16_t f;
24 } W;
25 
26 typedef struct
27 {
28   void* w;
29   D s;
30 } T;
31 
32 extern void* foo00 (void*, void*);
33 
foo01(W * w)34 void foo01 (W* w)
35 {
36   void* it;
37   uint16_t c, i;
38   T* cl;
39   T* rs;
40   T* t;
41   uint16_t rh = 0;
42   uint16_t v = !(w->f & 0x8000);
43   A a = { };
44 
45   for (c = 0, it = foo00 (w, 0); it; it = foo00 (w, it), c++);
46 
47   for (it = foo00 (w, 0), i = 0; i <= c; it = foo00 (w, it), i++, cl++)
48     {
49       if (i)
50  	for (t = rs; t < cl; t++)
51 	  *((uint16_t*)&t->s + ((!v) ? 1 : 0)) = rh;
52 
53       rh = (rh > ((*((uint16_t*)&a.s + ((!v) ? 1 : 0)))))
54 	   ? rh
55 	   : ((*((uint16_t*)&a.s + ((!v) ? 1 : 0))));
56     }
57 }
58