Debian Codegraph @

gcc/testsuite/g++.dg/lto/pr108772_0.C

raw
1 // { dg-lto-do link }
2 // { dg-require-effective-target shared }
3 // { dg-require-effective-target fpic }
4 // { dg-lto-options { "-flto -fPIC -shared -O1 -fimplicit-constexpr -g1" } }
5 // { dg-extra-ld-options "-shared" }
6
7 namespace std {
8 struct _Sp_counted_base {
9 virtual void *_M_get_deleter(const int &);
10 };
11 bool _S_eq(int);
12 struct _Sp_make_shared_tag {
13 static const int &_S_ti() {
14 static constexpr char __tag{};
15 return reinterpret_cast<const int &>(__tag);
16 }
17 };
18 struct _Impl {
19 _Impl(int);
20 };
21 int _Sp_counted_ptr_inplace___a;
22 struct _Sp_counted_ptr_inplace : _Sp_counted_base {
23 _Sp_counted_ptr_inplace() : _M_impl(_Sp_counted_ptr_inplace___a) {}
24 void *_M_get_deleter(const int &__ti) {
25 auto __ptr(_M_ptr());
26 &__ti == &_Sp_make_shared_tag::_S_ti() || _S_eq(__ti);
27 return __ptr;
28 }
29 int *_M_ptr();
30 _Impl _M_impl;
31 };
32 struct __shared_count {
33 __shared_count(int, int) { _Sp_counted_ptr_inplace(); }
34 };
35 int _M_ptr;
36 struct __shared_ptr {
37 template <typename _Alloc>
38 __shared_ptr(_Alloc __tag) : _M_refcount(_M_ptr, __tag) {}
39 __shared_count _M_refcount;
40 };
41 int shared_ptr___tag;
42 struct shared_ptr : __shared_ptr {
43 shared_ptr() : __shared_ptr(shared_ptr___tag) {}
44 };
45 void ArgEq() { shared_ptr(); }
46 } // namespace std