Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/constinit20.C

raw
1 // PR c++/119652
2 // { dg-do compile { target c++20 } }
3
4 struct __shared_count {
5 constexpr __shared_count() {}
6 ~__shared_count();
7 int _M_pi = 0;
8 };
9 struct shared_ptr {
10 __shared_count _M_refcount;
11 };
12 struct A {
13 A() = default;
14 shared_ptr m;
15 };
16 constinit A a;
17 constinit A b {};
18 constinit A c = {};