aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr90867.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/pr90867.c')
-rw-r--r--gcc/testsuite/gcc.target/i386/pr90867.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/pr90867.c b/gcc/testsuite/gcc.target/i386/pr90867.c
new file mode 100644
index 00000000000..1ed96b582ed
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr90867.c
@@ -0,0 +1,30 @@
+/* PR target/90867 */
+/* { dg-do run { target lp64 } } */
+/* { dg-options "-O2 -msse2" } */
+
+unsigned long long freq = 3600000000UL; /* 3.6 GHz = 3600.0 MHz */
+
+__attribute__((noipa)) void
+bar (double x)
+{
+ static double d = 3600000000.0;
+ if (x != d)
+ __builtin_abort ();
+ d /= 1000.0;
+}
+
+__attribute__ ((target ("arch=x86-64"))) int
+foo ()
+{
+ bar ((double) freq);
+ bar (1e-3 * freq);
+ bar (1e-6 * freq);
+ bar (1e-9 * freq);
+ return 0;
+}
+
+int
+main ()
+{
+ return foo ();
+}