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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [ieee/] [acc1.c] - Blame information for rev 825

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

Line No. Rev Author Line
1 149 jeremybenn
/* Tail call optimizations would reverse the order of additions in func().  */
2
 
3
double func (const double *array)
4
{
5
  double d = *array;
6
  if (d == 0.0)
7
    return d;
8
  else
9
    return d + func (array + 1);
10
}
11
 
12
int main ()
13
{
14
  double values[] = { 0.1e-100, 1.0, -1.0, 0.0 };
15
  if (func (values) != 0.1e-100)
16
    abort ();
17
  exit (0);
18
}

powered by: WebSVN 2.1.0

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