aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/constinit20.C
blob: 9b043917dc362a44737b004ad0ae4e397aae3643 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// PR c++/119652
// { dg-do compile { target c++20 } }

struct __shared_count {
  constexpr __shared_count() {}
  ~__shared_count();
  int _M_pi = 0;
};
struct shared_ptr {
  __shared_count _M_refcount;
};
struct A {
  A() = default;
  shared_ptr m;
};
constinit A a;
constinit A b {};
constinit A c = {};