gcc/testsuite/gcc.target/i386/pr24055.c
raw| 1 | /* PR target/24055 */ |
| 2 | /* Testcase reduced by Serge Belyshev */ |
| 3 | /* { dg-do compile } */ |
| 4 | /* { dg-options "-O2 -ffast-math" } */ |
| 5 | |
| 6 | extern double rint(double); |
| 7 | |
| 8 | void foo_1 (int *p, double x) |
| 9 | { |
| 10 | *p = rint (x); |
| 11 | } |
| 12 | |
| 13 | void foo_2 (long long *p, double x) |
| 14 | { |
| 15 | *p = rint (x); |
| 16 | } |
| 17 | |
| 18 | int foo_3 (double x) |
| 19 | { |
| 20 | return rint (x); |
| 21 | } |
| 22 | |
| 23 | long long foo_4 (double x) |
| 24 | { |
| 25 | return rint (x); |
| 26 | } |