Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gcc.c-torture / execute / ieee / mzero6.c
blob59ba6fee15ad622f5f49a989b65489d58cd264fe
1 /* Tail call optimizations would convert func() into the moral equivalent of:
3 double acc = 0.0;
4 for (int i = 0; i <= n; i++)
5 acc += d;
6 return acc;
8 which mishandles the case where 'd' is -0. They also initialised 'acc'
9 to a zero int rather than a zero double. */
11 double func (double d, int n)
13 if (n == 0)
14 return d;
15 else
16 return d + func (d, n - 1);
19 int main ()
21 if (__builtin_copysign (1.0, func (0.0 / -5.0, 10)) != -1.0)
22 abort ();
23 exit (0);