aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/debug/dwarf2/inline-var-2.C
blob: 9858cf13f448f963923d7081279aac93760797d5 (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
29
30
31
32
33
34
35
36
// { dg-do compile { target c++17 } }
// { dg-options "-O -gdwarf-5 -dA -gno-strict-dwarf" }
// { dg-require-weak "" }
// { dg-skip-if "AIX DWARF5" { powerpc-ibm-aix* } }
// { dg-final { scan-assembler-not "DW_TAG_member" } }

inline int a;
struct S
{
  static inline double b = 4.0;
  static constexpr int c = 2;
  static constexpr inline char d = 3;
  static const int j = 7;
  static int k;
  static double l;
} s;
const int S::j;
int S::k = 8;
template <int N>
inline int e = N;
int &f = e<2>;
template <int N>
struct T
{
  static inline double g = 4.0;
  static constexpr int h = 2;
  static inline constexpr char i = 3;
  static const int m = 8;
  static int n;
  static double o;
};
T<5> t;
template <>
const int T<5>::m;
template <>
int T<5>::n = 9;