summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/float128-1.c
blob: 9c6d22745f024100c0f330fe7c4262d9be3db62c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* { dg-do run { target *-*-linux* } } */
/* { dg-options "-O2 -msse2" } */

#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 ();
}