aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/complex-5.c
blob: 6ba5d47e14da8989021298fb59d51c0525d1e5f6 (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
void abort (void);
void exit (int);

float __complex__
p (float __complex__  a, float __complex__  b)
{
  return a + b;
}

float __complex__  x = 1.0 + 14.0 * (1.0fi);
float __complex__  y = 7.0 + 5.0 * (1.0fi);
float __complex__  w = 8.0 + 19.0 * (1.0fi);
float __complex__  z;

int
main (void)
{

  z = p (x,y);
  y = p (x, 1.0f / z);
  if (z != w)
    abort ();
  exit (0);
}