summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/graphite/scop-13.c
blob: aa55e10f3f47b726e32718755193b11ac261a5b9 (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
/* { dg-options "-O2 -fgraphite -fdump-tree-graphite-all" } */

void bar ();

int toto()
{
  int i,j, b;
  int a[100];

  if (i == 20)
    {
      b = 3;
      goto B;
    }
  else 
    {
      if (i == 30)
	{
          a[i] = b;


          for (j = 0; j <= 20; j++)
            a[j] = b + i;

          B:

          for (j = 0; j <= 20; j++)
            a[j+b] = b + i;
          
          bar ();
	}
      else 
        {
          a[i] = b + 3;
        }
    }


  return a[b];
}

/* { dg-final { scan-tree-dump-times "number of SCoPs: 2" 1 "graphite"} } */ 
/* { dg-final { cleanup-tree-dump "graphite" } } */