1 /* { dg-do compile } */
2 /* { dg-options "-Os -fdump-tree-optimized -fno-partial-inlining" } */
3 
4 /* When optimizing for size, t should be inlined when it expands to one call only.  */
5 extern int q(int);
t(int a)6 int t(int a)
7 {
8   if (a > 12)
9     {
10       q(a+5);
11       q(a+5);
12     }
13   else
14       q(a+10);
15 }
16 
17 int
main()18 main()
19 {
20    t(5);
21    t(20);
22 }
23 /* { dg-final { scan-tree-dump-times "q \\(15\\)" 1 "optimized" } } */
24 /* { dg-final { scan-tree-dump-times "t \\(20\\)" 1 "optimized" } } */
25