2018-04-30 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr80803.c
blob29a40c24cee7d6712b7b8dd3bba479851419ae4a
1 /* { dg-do run { target int32plus } } */
2 /* { dg-options "-O" } */
4 struct S0
6 unsigned a : 15;
7 int b;
8 int c;
9 };
11 struct S1
13 struct S0 s0;
14 int e;
17 struct Z
19 char c;
20 int z;
21 } __attribute__((packed));
23 union U
25 struct S1 s1;
26 struct Z z;
30 int __attribute__((noinline, noclone))
31 return_zero (void)
33 return 0;
36 volatile union U gu;
37 struct S0 gs;
39 int __attribute__((noinline, noclone))
40 check_outcome ()
42 if (gs.a != 6
43 || gs.b != 80000)
44 __builtin_abort ();
47 int
48 main (int argc, char *argv[])
50 union U u;
51 struct S1 m,n;
52 struct S0 l;
54 if (return_zero ())
55 u.z.z = 20000;
56 else
58 u.s1.s0.a = 6;
59 u.s1.s0.b = 80000;
60 u.s1.e = 2;
62 n = u.s1;
63 m = n;
64 m.s0.c = 0;
65 l = m.s0;
66 gs = l;
69 gu = u;
70 check_outcome ();
71 return 0;