summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/debug/dwarf2/inline-var-2.C
blob: ed00fb5d2c922da1f3ee7fae80c57fd54fa34a06 (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
// { dg-do compile }
// { dg-options "-O -std=c++17 -gdwarf-5 -dA -gno-strict-dwarf" }
// { dg-require-weak "" }
// { dg-final { scan-assembler-not "DW_TAG_member" { xfail *-*-aix* } } }

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;