]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/live-patching-4.c
Update copyright years.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / live-patching-4.c
CommitLineData
bc53dee0
QZ
1/* { dg-do compile } */
2/* { dg-options "-O2 -flive-patching=inline-only-static -fdump-tree-einline-optimized" } */
3
4extern int sum, n, m;
5
6extern inline __attribute__((always_inline)) int foo (int a);
7inline __attribute__((always_inline)) int foo (int a)
8{
9 return a + n;
10}
11
12static int bar (int b)
13{
14 return b * m;
15}
16
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" } } */