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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [complex-3.c] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
struct complex
2
{
3
  float r;
4
  float i;
5
};
6
 
7
struct complex cmplx (float, float);
8
 
9
struct complex
10
f (float a, float b)
11
{
12
  struct complex c;
13
  c.r = a;
14
  c.i = b;
15
  return c;
16
}
17
 
18
main ()
19
{
20
  struct complex z = f (1.0, 0.0);
21
 
22
  if (z.r != 1.0 || z.i != 0.0)
23
    abort ();
24
  exit (0);
25
}

powered by: WebSVN 2.1.0

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