summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/divkc3-1.c
blob: 89bf04f12a974635d60f257033b5be837fd978c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-do run { target { powerpc64*-*-* && p8vector_hw } } } */
/* { dg-options "-mfloat128 -mvsx" } */

void abort ();

typedef __complex float __cfloat128 __attribute__((mode(KC)));

__cfloat128 divide (__cfloat128 x, __cfloat128 y)
{
  return x / y;
}

__cfloat128 z, a;

int main ()
{
  z = divide (5.0q + 5.0jq, 2.0q + 1.0jq);
  a = 3.0q + 1.0jq;
  if (z != a)
    abort ();
  return 0;
}