summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr48768.c
blob: 7d0383e83bc8516318cce69d3a599fc1bce1f80d (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
38
/* PR debug/48768 */
/* { dg-do compile } */
/* { dg-options "-O -fcompare-debug" } */

int a, b;

int
bar (void)
{
  int i, j = 1;
  for (i = 0; i != 10; i++)
    {
    lab:
      if (i)
	{
	  int *k = &j;
	}
      else if (j)
	goto lab;
    }
  return 1;
}

inline int
foo (int x)
{
  unsigned int c = x;
  int d = x;
  if (bar ())
    for (; c; c++)
      while (x >= 0)
	if (foo (d) >= 0)
	  {
	    d = bar ();
	    a = b ? b : 1;
	  }
  return 0;
}