OSDN Git Service

2008-05-20 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.c-torture / execute / pr29798.c
1 extern void abort ();
2
3 int
4 main ()
5 {
6   int i;
7   double oldrho;
8   double beta = 0.0;
9   double work = 1.0;
10   for (i = 1; i <= 2; i++)
11     {
12       double rho = work * work;
13       if (i != 1)
14         beta = rho / oldrho;
15       if (beta == 1.0)
16         abort ();
17
18       /* All targets even remotely likely to ever get supported
19          use at least an even base, so there will never be any
20          floating-point rounding. All computation in this test
21          case is exact for even bases.  */
22       work /= 2.0;
23       oldrho = rho;
24     }
25   return 0;
26 }