aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/i386/float128-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/i386/float128-1.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/float128-1.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/float128-1.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/float128-1.c
new file mode 100644
index 000000000..76f5dba50
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/float128-1.c
@@ -0,0 +1,25 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -msse2" } */
+/* { dg-require-effective-target sse2 } */
+
+#include "sse2-check.h"
+
+extern void abort (void);
+
+typedef _Complex float __attribute__((mode(TC))) _Complex128;
+
+_Complex128 __attribute__ ((noinline))
+foo (_Complex128 x, _Complex128 y)
+{
+ return x * y;
+}
+
+static void
+sse2_test (void)
+{
+ _Complex128 a = 1.3q + 3.4qi, b = 5.6q + 7.8qi, c;
+
+ c = foo (a, b);
+ if (__real__(c) == 0.0q || __imag__ (c) == 0.0q)
+ abort ();
+}