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" }
8 struct _Sp_counted_base {
9 virtual void *_M_get_deleter(const 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);
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) {
26 &__ti == &_Sp_make_shared_tag::_S_ti() || _S_eq(__ti);
32 struct __shared_count {
33 __shared_count(int, int) { _Sp_counted_ptr_inplace(); }
37 template <typename _Alloc>
38 __shared_ptr(_Alloc __tag) : _M_refcount(_M_ptr, __tag) {}
39 __shared_count _M_refcount;
42 struct shared_ptr : __shared_ptr {
43 shared_ptr() : __shared_ptr(shared_ptr___tag) {}
45 void ArgEq() { shared_ptr(); }