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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [cvt-1.c] - Blame information for rev 774

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

Line No. Rev Author Line
1 688 jeremybenn
static inline long
2
g1 (double x)
3
{
4
  return (double) (long) x;
5
}
6
 
7
long
8
g2 (double f)
9
{
10
  return f;
11
}
12
 
13
double
14
f (long i)
15
{
16
  if (g1 (i) != g2 (i))
17
    abort ();
18
  return g2 (i);
19
}
20
 
21
main ()
22
{
23
  if (f (123456789L) != 123456789L)
24
    abort ();
25
  if (f (123456789L) != g2 (123456789L))
26
    abort ();
27
  exit (0);
28
}

powered by: WebSVN 2.1.0

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