blob: 9fa8b6953f191ddeb24e9dd099b44f18570c2f01 [file] [log] [blame]
Jakub Jelinek5bf51f22013-12-04 12:25:06 +01001/* PR rtl-optimization/58726 */
2
3int a, c;
4union { int f1; int f2 : 1; } b;
5
6short
7foo (short p)
8{
9 return p < 0 ? p : a;
10}
11
12int
13main ()
14{
15 if (sizeof (short) * __CHAR_BIT__ != 16
16 || sizeof (int) * __CHAR_BIT__ != 32)
17 return 0;
18 b.f1 = 56374;
19 unsigned short d;
20 int e = b.f2;
21 d = e == 0 ? b.f1 : 0;
22 c = foo (d);
23 if (c != (short) 56374)
24 __builtin_abort ();
25 return 0;
26}