gcc/testsuite/gcc.c-torture/compile/920410-1.c
raw| 1 | int alloc_float(f) |
| 2 | float f; |
| 3 | { union |
| 4 | { |
| 5 | float f; |
| 6 | int i; |
| 7 | } |
| 8 | u; |
| 9 | u.f=f; |
| 10 | return u.i&~1; |
| 11 | } |
| 12 | |
| 13 | float c_float(int obj) |
| 14 | { union |
| 15 | { |
| 16 | float f; |
| 17 | int i; |
| 18 | } u; |
| 19 | |
| 20 | u.i=obj; |
| 21 | return u.f; |
| 22 | } |
| 23 | |
| 24 | int |
| 25 | main(void) |
| 26 | { int x=alloc_float(1.2); |
| 27 | int y=alloc_float(5.7); |
| 28 | int z=alloc_float(c_float(x)*c_float(y)); |
| 29 | |
| 30 | __builtin_printf("%g\n",(double)c_float(z)); |
| 31 | } |