| 1 |
// { dg-do compile { target c++17 } } |
| 2 |
// { dg-options "-O -gdwarf-2 -dA -gno-strict-dwarf -fno-eliminate-unused-debug-symbols" } |
| 3 |
// { dg-require-weak "" } |
| 4 |
// { dg-final { scan-assembler-times "0x3\[^\n\r]* DW_AT_inline" 6 } } |
| 5 |
// { dg-final { scan-assembler-times "0x1\[^\n\r]* DW_AT_inline" 2 } } |
| 6 |
// { dg-final { scan-assembler-times " DW_AT_declaration" 6 } } |
| 7 |
// { dg-final { scan-assembler-times " DW_AT_specification" 6 } } |
| 8 |
// { dg-final { scan-assembler-times " DW_AT_\[^\n\r]*linkage_name" 7 } } |
| 9 |
|
| 10 |
inline int a; |
| 11 |
int& ar = a; |
| 12 |
|
| 13 |
struct S |
| 14 |
{ |
| 15 |
static inline double b = 4.0; |
| 16 |
static constexpr int c = 2; |
| 17 |
static constexpr inline char d = 3; |
| 18 |
} s; |
| 19 |
template <int N> |
| 20 |
inline int e = N; |
| 21 |
int &f = e<2>; |
| 22 |
template <int N> |
| 23 |
struct T |
| 24 |
{ |
| 25 |
static inline double g = 4.0; |
| 26 |
static constexpr int h = 2; |
| 27 |
static inline constexpr char i = 3; |
| 28 |
}; |
| 29 |
T<5> t; |