summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-prof/update-cunroll-2.c
blob: d559b924535e2cd9830c1a5bc2738eccc4c0dda2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* { dg-options "-O2 -fdump-tree-optimized-blocks" } */
int a[8];
__attribute__ ((noinline))
int t()
{
	int i;
	for (i = 0; i < 3; i++)
		if (a[i])
			break;
	return i;
}
main ()
{
  int i;
  for (i = 0; i < 1000; i++)
    t ();
  return 0;
}
/* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */
/* { dg-final-use { cleanup-tree-dump "optimized" } } */