aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/inline-9.c
blob: 678dd852db6aedec71a9a7deda40d864e70ccb8b (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
/* { dg-do compile } */
/* { dg-options "-Os -fdump-tree-optimized -fno-partial-inlining" } */

/* When optimizing for size, t should be inlined when it expands to one call only.  */
extern int q(int);
int t(int a)
{
  if (a > 12)
    {
      q(a+5);
      q(a+5);
    }
  else
      q(a+10);
}

main()
{
   t(5);
   t(20);
}
/* { dg-final { scan-tree-dump-times "q \\(15\\)" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "t \\(20\\)" 1 "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */