1 /* PR debug/55730 */
2 /* { dg-do compile } */
3 /* { dg-options "-w" } */
4 
5 union U
6 {
7   float f;
8   int i;
9 };
10 
11 void
foo(unsigned short * x,unsigned char y)12 foo (unsigned short *x, unsigned char y)
13 {
14   unsigned char g;
15   union U u;
16   if (u.i < 0)
17     g = 0;
18   else
19     {
20       u.f = u.f * (255.0F / 256.0F) + 32768.0F;
21       g = (unsigned char) u.i;
22     }
23   *x = (g << 8) | y;
24 }
25