Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/ext/always_inline-5.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 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" } } |