]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/live-patching-4.c
Update copyright years.
[thirdparty/gcc.git] / 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" } } */