summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr24055.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/pr24055.c')
-rw-r--r--gcc/testsuite/gcc.target/i386/pr24055.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/pr24055.c b/gcc/testsuite/gcc.target/i386/pr24055.c
new file mode 100644
index 000000000..5190ec4b9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr24055.c
@@ -0,0 +1,26 @@
+/* PR target/24055 */
+/* Testcase reduced by Serge Belyshev */
+/* { dg-do compile } */
+/* { dg-options "-O2 -ffast-math" } */
+
+extern double rint(double);
+
+void foo_1 (int *p, double x)
+{
+ *p = rint (x);
+}
+
+void foo_2 (long long *p, double x)
+{
+ *p = rint (x);
+}
+
+int foo_3 (double x)
+{
+ return rint (x);
+}
+
+long long foo_4 (double x)
+{
+ return rint (x);
+}