aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/inline-8.c
blob: 3215473ec1a0010bb32afc42a0d5f86ed26cb5c2 (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
/* { dg-do compile } */
/* { dg-options "-O -finline-small-functions --param early-inlining-insns=0 -fdump-tree-einline" } */

int foo0();
void bar0() { foo0(); }
void foobar0() { bar0(); }

void foo1();
void bar1() { foo1(); }
void foobar1() { bar1(); }

#if 0
int foo2();
int bar2() { return foo2(); }
/* The size estimate fails to see that inlining the call statement in bar2
   will make its lhs dead.  */
void foobar2() { bar2(); }
#endif

int foo3();
int bar3() { return foo3(); }
int foobar3() { return bar3(); }

int bar4() { return 0; }
void foobar4() { bar4(); }

int bar5() { return 0; }
int foobar5() { return bar5(); }

/* { dg-final { scan-tree-dump-times "Inlining" 5 "einline" } } */
/* { dg-final { cleanup-tree-dump "einline" } } */