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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [ieee/] [acc2.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
/* Tail call optimizations would reverse the order of multiplications
2
   in func().  */
3
 
4
double func (const double *array)
5
{
6
  double d = *array;
7
  if (d == 1.0)
8
    return d;
9
  else
10
    return d * func (array + 1);
11
}
12
 
13
int main ()
14
{
15
  double values[] = { __DBL_MAX__, 2.0, 0.5, 1.0 };
16
  if (func (values) != __DBL_MAX__)
17
    abort ();
18
  exit (0);
19
}

powered by: WebSVN 2.1.0

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