1 /* { dg-do compile } */ 2 /* { dg-options "-O2 -flive-patching=inline-only-static -fdump-tree-einline-optimized" } */ 3 4 extern int sum, n, m; 5 6 extern inline __attribute__((always_inline)) int foo (int a); foo(int a)7inline __attribute__((always_inline)) int foo (int a) 8 { 9 return a + n; 10 } 11 bar(int b)12static int bar (int b) 13 { 14 return b * m; 15 } 16 main()17int main() 18 { 19 sum = foo (m) + bar (n); 20 return 0; 21 } 22 23 /* { dg-final { scan-tree-dump "Inlining foo/0 into main/2" "einline" } } */ 24