summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-prof/merge_block.c
blob: da4ec5a867653ee0fa77d310ccf13d31f57f7485 (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 -fno-ipa-pure-const -fdump-tree-optimized-blocks-details -fno-early-inlining" } */
int a[8];
int t()
{
	int i;
	for (i = 0; i < 3; i++)
		if (a[i])
			break;
	return i;
}
int
main ()
{
  int i;
  /* The loop will be optimized away after ipa-inline.  */
  for (i = 0; i < 1000; i++)
    t ();
  return 0;
}
/* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */