aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/pr19340.c
blob: c75d35d1d01a8755bca00133932f87a7c1707424 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* { dg-do compile } */
/* { dg-options "-O1 -fschedule-insns2 -fsched2-use-superblocks" } */
/* { dg-require-effective-target scheduling } */

extern double f (double x);

double g (int a)
{
  int b, c, d, e = 0;
  double h;

  for (d = 0; d < a; d++)
    for (c = 0; c < a; c++)
      b = 1;

  h = (double) e / (double) a;

  if (h)
    {
      h = 1.0 / h;
      h = f (h);
    }
  else
    h = 1.0;

  return h;
}