summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/ieee/20001122-1.c
blob: fd7e70262aaee39d429cf12935e51bdf0bfe915b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
volatile double a, *p;

int main ()
{
  double c, d;
  volatile double b;

  d = 1.0;
  p = &b;
  do
  {
    c = d;
    d = c * 0.5;
    b = 1 + d;
  } while (b != 1.0);

  a = 1.0 + c;
  if (a == 1.0)
    abort();

  exit (0);
}