summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-52.c
blob: 8b607d576acc513a63eb034b66ff594f926358cd (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
/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-fre1" } */

void bar ();
void foo (int n)
{
  if (n > 0)
    {
      int j = 0;
      do
	{
	  if (n > 0)
	    {
	      int i = 0;
	      do
		{
		  bar ();
		}
	      while (i < n);
	    }
	}
      while (j < n);
    }
}

/* { dg-final { scan-tree-dump-times "if" 1 "fre1" } } */