Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / pr52132.c
blobed1eb1becd2a4dbced2125d6cbacec495389b801
1 /* PR debug/52132 */
2 /* { dg-do compile } */
3 /* { dg-options "-std=c99 -O2 -g" } */
5 #if (__SIZEOF_INT__ < __SIZEOF_FLOAT__) \
6 && (__SIZEOF_LONG__ == __SIZEOF_FLOAT__)
7 #define int long
8 #endif
10 int l;
11 void bar (void);
13 void
14 foo (int *x, float y)
16 float b;
17 union { float f; int i; } u = { .f = y };
18 #if (__SIZEOF_INT__ < __SIZEOF_FLOAT__)
19 u.i += 127L << 23;
20 #else
21 u.i += 127 << 23;
22 #endif
23 u.f = ((-1.0f / 3) * u.f + 2) * u.f - 2.0f / 3;
24 b = 0.5 * (u.f + l);
25 if (b >= *x)
26 bar ();