Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr80898-2.c
blobcb4799c5ced211b6b5089d0f29526fa4e9558ce6
1 /* { dg-do run } */
2 /* { dg-options "-O2" } */
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;
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 m = u.s1;
63 m.s0.c = 0;
64 l = m.s0;
65 gs = l;
68 gu = u;
69 check_outcome ();
70 return 0;