summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr47899.c
blob: c83bb85e314ca2d9dc751f530a65326af3256cb8 (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
/* PR rtl-optimization/47899 */
/* { dg-do compile } */
/* { dg-options "-O -funroll-loops" } */

extern unsigned int a, b, c;
extern int d;

static int
foo (void)
{
lab:
  if (b)
    for (d = 0; d >= 0; d--)
      if (a || c)
	for (; c; c++)
	  ;
      else
	goto lab;
}

int
main ()
{
  foo ();
  return 0;
}