gcc/testsuite/gcc.c-torture/execute/pr44683.c
raw| 1 | int __attribute__((noinline,noclone)) |
| 2 | copysign_bug (double x) |
| 3 | { |
| 4 | if (x != 0.0 && (x * 0.5 == x)) |
| 5 | return 1; |
| 6 | if (__builtin_copysign(1.0, x) < 0.0) |
| 7 | return 2; |
| 8 | else |
| 9 | return 3; |
| 10 | } |
| 11 | int main(void) |
| 12 | { |
| 13 | double x = -0.0; |
| 14 | if (copysign_bug (x) != 2) |
| 15 | __builtin_abort (); |
| 16 | return 0; |
| 17 | } |
| 18 |