summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/always_inline-5.C
blob: 73caa094f4724d89c2ccd10e53cdde5615c24952 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// { dg-do compile }
struct f
{
  inline f(void);
  inline void f1(void);
  int a;
};

inline __attribute__((always_inline))  f::f(void)
{
  a++;
}

inline __attribute__((always_inline)) void  f::f1(void)
{
  a++;
}

void g(void)
{
  f a, b, c, d;
  a.f1();
}

// f::f() should be inlined even at -O0
// { dg-final { scan-assembler-not "_ZN1fC1Ev" } }
// Likewise for f::f1()
// { dg-final { scan-assembler-not "_ZN1f2f1Ev" } }