summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-ccp-1.c
blob: b2bcd06bedbda3134099cb6e6d0d65fa4e509db3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-do compile } */ 
/* { dg-options "-O2 -fdump-tree-optimized" } */
int t(int a) __attribute__ ((const));
void abort (void);
int
ccp(int b)
{
	int a=1;
	a++;
	a++;
	a++;
	if (b)
	  abort();
	return a;
}
/* We should propagate constant 4 into return.  */
/* { dg-final { scan-tree-dump-times "return 4" 1 "optimized"} } */
/* { dg-final { cleanup-tree-dump "optimized" } } */