aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/loop-unswitch-5.c
blob: 77880005301eacf6663e61182e8b0d128f86f36d (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
39
40
41
42
43
44
45
46
47
48
49
50
51
/* PR middle-end/71691 */
/* { dg-do run } */
/* { dg-options "-fno-tree-vrp -O2 -funswitch-loops" } */

/* Note: The -fno-tree-vrp above is only there to avoid VRP papering
   over the problem.  */

char b;
short f;
unsigned e;
int g = 20;

void
foo ()
{
  int l, h;
  for (l = 0; l <= 7; l++)
    {
      int j = 38;
      if (g)
	h = 0;
      for (; h <= 7; h++)
	{
	  int i, k = b % (j % 4);
	  g = f;
	  for (;;)
	    {
	      j = 6 || b;
	      if (e)
		{
		  for (; j; --j)
		    if (k)
		      __builtin_printf ("%d", 9);
		  if (i)
		    __builtin_printf ("%d", j);
		}
	      if (l)
		continue;
	      break;
	    }
	  i = f || b;
	}
    }
}

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