OSDN Git Service

PR tree-optimization/51799
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-ccp-20.c
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-ccp1" } */
3
4 /* Make sure CCP propagates through indirect calls.  */
5
6 int foo (void)
7 {
8   int i = -5;
9   int (*fn)(int) = __builtin_abs;
10   int j = fn(i);
11   return j + 5;
12 }
13
14 /* { dg-final { scan-tree-dump "return 10;" "ccp1" } } */
15 /* { dg-final { cleanup-tree-dump "ccp1" } } */