aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/testsuite/gcc.target/i386/pr44578.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8/gcc/testsuite/gcc.target/i386/pr44578.c')
-rw-r--r--gcc-4.8/gcc/testsuite/gcc.target/i386/pr44578.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/testsuite/gcc.target/i386/pr44578.c b/gcc-4.8/gcc/testsuite/gcc.target/i386/pr44578.c
new file mode 100644
index 000000000..20f76c31c
--- /dev/null
+++ b/gcc-4.8/gcc/testsuite/gcc.target/i386/pr44578.c
@@ -0,0 +1,31 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mtune=athlon64" } */
+
+extern void abort (void);
+
+long double
+__attribute__((noinline, noclone))
+test (float num)
+{
+ unsigned int i;
+
+ if (num < 0.0)
+ num = 0.0;
+
+ __builtin_memcpy (&i, &num, sizeof(unsigned int));
+
+ return (long double)(unsigned long long) i;
+}
+
+int
+main ()
+{
+ long double x;
+
+ x = test (0.0);
+
+ if (x != 0.0)
+ abort ();
+
+ return 0;
+}