2018-04-30 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr45144.c
blobe799039b631314c90b2ff032925dc95d01ef9402
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
3 /* { dg-require-effective-target int32plus } */
5 void baz (unsigned);
7 extern unsigned buf[];
9 struct A
11 unsigned a1:10;
12 unsigned a2:3;
13 unsigned:19;
16 union TMP
18 struct A a;
19 unsigned int b;
22 static unsigned
23 foo (struct A *p)
25 union TMP t;
26 struct A x;
28 x = *p;
29 t.a = x;
30 return t.b;
33 void
34 bar (unsigned orig, unsigned *new)
36 struct A a;
37 union TMP s;
39 s.b = orig;
40 a = s.a;
41 if (a.a1)
42 baz (a.a2);
43 *new = foo (&a);
46 /* { dg-final { scan-tree-dump-not "unnamed-unsigned:19" "optimized"} } */