Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/pr52132.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* PR debug/52132 */ | |
2 /* { dg-do compile } */ | |
3 /* { dg-options "-std=c99 -O2 -g" } */ | |
4 | |
5 #if (__SIZEOF_INT__ < __SIZEOF_FLOAT__) \ | |
6 && (__SIZEOF_LONG__ == __SIZEOF_FLOAT__) | |
7 #define int long | |
8 #endif | |
9 | |
10 int l; | |
11 void bar (void); | |
12 | |
13 void | |
14 foo (int *x, float y) | |
15 { | |
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 (); | |
27 } |