2014-07-29 Ed Smith-Rowland <3dw4rd@verizon.net>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr51695.c
blob6eb45400b6503424fd0f27811bd515779dbad4d3
1 /* PR debug/51695 */
2 /* { dg-do compile { target { int32plus } } } */
3 /* { dg-options "-O2 -g" } */
5 typedef struct
7 struct { unsigned int t1, t2, t3, t4, t5, t6; } t;
8 int p;
9 struct { double X, Y, Z; } r;
10 } T;
11 typedef struct { T *h; } S;
13 static unsigned int v = 0x12345678;
15 int
16 foo (void)
18 v = (v & 0x80000000) ? ((v << 1) ^ 0xa398655d) : (v << 1);
19 return 0;
22 double
23 bar (void)
25 unsigned int o;
26 v = (v & 0x80000000) ? ((v << 1) ^ 0xa398655d) : (v << 1);
27 o = v & 0xffff;
28 return (double) o / 32768.0;
31 int
32 baz (void)
34 foo ();
35 return 0;
38 void
39 test (S *x)
41 T *t = x->h;
42 t->t.t1 = foo ();
43 t->t.t2 = foo ();
44 t->t.t3 = foo ();
45 t->t.t4 = foo ();
46 t->t.t5 = foo ();
47 t->t.t6 = foo ();
48 t->p = baz ();
49 t->r.X = bar ();
50 t->r.Y = bar ();
51 t->r.Z = bar ();