2015-09-24 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / 20060425-1.c
blob7d899b2bba69470b1976283dd5b754007b15cce3
1 /* { dg-do run } */
2 /* { dg-options "-O1" } */
4 /* This failed because if conversion didn't handle insv patterns properly. */
6 void abort (void);
8 union y
10 int a;
11 unsigned short b;
14 void __attribute__ ((noinline))
15 bar (unsigned short u, union y v)
17 if (u != 1)
18 abort ();
21 void __attribute__ ((noinline))
22 foo (int check)
24 union y x;
26 if (check != 0)
27 x.b = 1;
28 else
29 x.b = 2;
30 bar (x.b, x);
33 int
34 main ()
36 foo (1);
37 return 0;