Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/ieee/acc1.c

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