1/* { dg-do run { target *-*-linux* } } */
2/* { dg-options "-O2 -msse2" } */
3/* { dg-require-effective-target sse2 } */
4
5#include "sse2-check.h"
6
7extern void abort (void);
8
9typedef _Complex float __attribute__((mode(TC))) _Complex128;
10
11_Complex128 __attribute__ ((noinline))
12foo (_Complex128 x, _Complex128 y)
13{
14  return x * y;
15}
16
17static void
18sse2_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