(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
live-patching-4.c
       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);
       7  inline __attribute__((always_inline)) int foo (int a)
       8  {
       9    return a + n;
      10  }
      11  
      12  static int bar (int b)
      13  {
      14    return b * m;
      15  }
      16  
      17  int 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" } } */