1 /* { dg-do run } */
2 /* { dg-options "-O2 -msse2" } */
3 /* { dg-require-effective-target sse2 } */
4 
5 #include "sse2-check.h"
6 
7 extern void abort (void);
8 
9 typedef _Complex float __attribute__((mode(TC))) _Complex128;
10 
11 _Complex128 __attribute__ ((noinline))
foo(_Complex128 x,_Complex128 y)12 foo (_Complex128 x, _Complex128 y)
13 {
14   return x * y;
15 }
16 
17 static void
sse2_test(void)18 sse2_test (void)
19 {
20   _Complex128 a = 1.3q + 3.4qi, b = 5.6q + 7.8qi, c;
21 
22   c = foo (a, b);
23   if (__real__(c) == 0.0q || __imag__ (c) == 0.0q)
24     abort ();
25 }
26