Merge from mainline (160224:163495).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.dg / tree-ssa / pr45144.c
blob47530ced46e4001894e27bb0dd7f0eee797377a7
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
4 void baz (unsigned);
6 extern unsigned buf[];
8 struct A
10 unsigned a1:10;
11 unsigned a2:3;
12 unsigned:19;
15 union TMP
17 struct A a;
18 unsigned int b;
21 static unsigned
22 foo (struct A *p)
24 union TMP t;
25 struct A x;
27 x = *p;
28 t.a = x;
29 return t.b;
32 void
33 bar (unsigned orig, unsigned *new)
35 struct A a;
36 union TMP s;
38 s.b = orig;
39 a = s.a;
40 if (a.a1)
41 baz (a.a2);
42 *new = foo (&a);
45 /* { dg-final { scan-tree-dump "x = a;" "optimized"} } */
46 /* { dg-final { cleanup-tree-dump "optimized" } } */