OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [complex-2.c] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 688 jeremybenn
__complex__ double
2
f (__complex__ double x, __complex__ double y)
3
{
4
  x += y;
5
  return x;
6
}
7
 
8
__complex__ double ag = 1.0 + 1.0i;
9
__complex__ double bg = -2.0 + 2.0i;
10
 
11
main ()
12
{
13
  __complex__ double a, b, c;
14
 
15
  a = ag;
16
  b = -2.0 + 2.0i;
17
  c = f (a, b);
18
 
19
  if (a != 1.0 + 1.0i)
20
    abort ();
21
  if (b != -2.0 + 2.0i)
22
    abort ();
23
  if (c != -1.0 + 3.0i)
24
    abort ();
25
 
26
  exit (0);
27
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.