summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr23391.c
blob: a5effbb15aa9cc75f751b5ddc1bc5090f3509952 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* { dg-do compile } */
/* { dg-options "-O2" } */

void 
foo (int N) 
{ 
  int C; 
  double R; 
 
  R = 0.0; 
  do 
    { 
      R += 0.001; 
      C = (int) (R * N); 
      if (-R * N <= R * N) 
        { 
          C++; 
        } 
    } 
  while (C < 0); 
 
  return; 
}