aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr106967.c
blob: bff27956f606357f490525a4065eafdd3713456c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// { dg-do compile }
// { dg-options "-O2 -ffinite-math-only -fno-trapping-math -fno-tree-dominator-opts" }

void
foo (float x, int *y)
{
  int i;
  float sum2 = 0.0;

  for (i = 0; i < *y; ++i)
    sum2 += x;

  sum2 = 1.0 / sum2;
  if (sum2 * 0.0 < 5.E-5)
    *y = 0;
}