Debian Codegraph @

gcc/testsuite/g++.dg/ext/always_inline-5.C

raw
1 // { dg-do compile }
2 struct f
3 {
4 inline f(void);
5 inline void f1(void);
6 int a;
7 };
8
9 inline __attribute__((always_inline)) f::f(void)
10 {
11 a++;
12 }
13
14 inline __attribute__((always_inline)) void f::f1(void)
15 {
16 a++;
17 }
18
19 void g(void)
20 {
21 f a, b, c, d;
22 a.f1();
23 }
24
25 // f::f() should be inlined even at -O0
26 // { dg-final { scan-assembler-not "_ZN1fC1Ev" } }
27 // Likewise for f::f1()
28 // { dg-final { scan-assembler-not "_ZN1f2f1Ev" } }