Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/live-patching-4.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
rev | line source |
---|---|
145 | 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" } } */ |