aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/torture/pr59166.c
blob: d29ec33e0f93d0d930ffa4dbf4c8696b867b1e15 (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
28
29
30
31
32
33
34
35
36
37
/* PR rtl-optimization/59166 */
/* { dg-additional-options "-fcompare-debug" } */

int a, b, c, f, g;

void
foo ()
{
  for (; b; b++)
    for (; f; f = g)
      for (; a;)
	;
}

static int
bar (int p)
{
  short d;
  if (c)
    {
      for (; f; f = g);
      foo ();
      d = p;
      char e = d;
      if (p)
	return 1;
    }
  return p;
}

int
main ()
{
  bar (0);
  bar (g);
  return 0;
}