summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr21921.c
blob: d6a8a2a94bf12f3426cc30432b6745c253e23daf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-do compile } */
/* { dg-options "-O1 -funsafe-math-optimizations" } */

void
Q (double *s, double h)
{
  int i;
  if (h > 1)
    h = h - 1;

  for (i = 1; i < 3; i++)
    if (s[i] / h > 0)
      s[0] = h, s[i] = s[i] / h;
}