This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/69785] c++filt can't demangle string or compiler produce wrong mangled string


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69785

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org
          Component|debug                       |c++

--- Comment #8 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Might be a wrong code bug.
gcc-6 is fine:

markus@x4 tmp % cat registry.ii
namespace std {
inline namespace __cxx11 {}
template <typename _Tp, _Tp __v> struct A { static constexpr _Tp value = __v;
};
template <typename> struct conditional;
template <typename...> struct __and_;
template <typename _B1, typename _B2>
struct __and_<_B1, _B2> : conditional<_B1>::type {};
template <typename _From, typename _To> struct __is_convertible_helper {
  template <typename, typename> static A<bool, true> __test(int);
  typedef decltype(__test<_From, _To>(0)) type;
};
template <typename>
struct is_convertible : __is_convertible_helper<int, int>::type {};
template <int> struct enable_if;
template <typename> struct conditional { typedef is_convertible<int> type; };
template <class, class> struct pair {
  template <class _U1,
            class _U2 = enable_if<__and_<int, is_convertible<int>>::value>>
  pair(pair<_U1, _U2>);
};
template <class _T1, class _T2> pair<int, int> make_pair(_T1, _T2);
}
namespace __gnu_cxx {
template <typename> class new_allocator {
public:
  template <typename _Tp1> struct rebind { typedef new_allocator<_Tp1> other;
};
  template <typename _Up, typename... _Args>
  void construct(_Up *, _Args &&...) {}
};
}
namespace std {
template <typename _Tp> using __allocator_base = __gnu_cxx::new_allocator<_Tp>;
template <typename> class allocator : public __allocator_base<int> {};
template <class> struct char_traits;
namespace __cxx11 {
template <typename _CharT, typename, typename = allocator<_CharT>>
class basic_string;
}
namespace tr1 {
template <typename> class weak_ptr;
}
}
namespace libecap {
bool RegisterVersionedService();
namespace adapter {
class Service {};
}
}
namespace std {
template <typename> struct _List_node;
template <typename> class B {
protected:
  allocator<int>::rebind<
      _List_node<pair<basic_string<char, char_traits<char>>,
                      tr1::weak_ptr<libecap::adapter::Service>>>>::other
  _M_get_Node_allocator();
};
class C : B<allocator<pair<int, tr1::weak_ptr<libecap::adapter::Service>>>> {
  _List_node<pair<basic_string<char, char_traits<char>>,
                  tr1::weak_ptr<libecap::adapter::Service>>>
      *_M_create_node___p;
  template <typename... _Args> void _M_create_node(_Args &&... p1) try {
    _M_get_Node_allocator().construct(_M_create_node___p, p1...);
  } catch (...) {
  }
public:
  pair<int, int> end();
  pair<int, int> push_back___trans_tmp_1 = end();
  void push_back(const pair<basic_string<char, char_traits<char>>,
                            tr1::weak_ptr<libecap::adapter::Service>>
                     p1) {
    _M_insert(push_back___trans_tmp_1, p1);
  }
  template <typename... _Args> void _M_insert(pair<int, int>, _Args &&... p2) {
    _M_create_node(p2...);
  }
};
}
std::C TheStagingArea;
char RegisterVersionedService_v;
bool libecap::RegisterVersionedService() {
  adapter::Service s;
  std::pair<int, int> si = std::make_pair(RegisterVersionedService_v, s);
  TheStagingArea.push_back(si);
}

markus@x4 tmp % clang++ -std=c++11 -w -c registry.ii -S -o - | grep
_ZN9__gnu_cxx13new_allocatorISt10_List_nodeISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt3tr18weak_ptrIN7libecap7adapter7ServiceEEEEEE9constructISG_IRKSF_EEEvPT_DpOT0_

markus@x4 tmp % g++ -std=c++11 -c registry.ii -S -o - | grep
_ZN9__gnu_cxx13new_allocatorISt10_List_nodeISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt3tr18weak_ptrIN7libecap7adapter7ServiceEEEEEE9constructISG_IRKSF_EEEvPT_DpOT0_

markus@x4 tmp % /usr/x86_64-pc-linux-gnu/gcc-bin/4.9.3/g++ -std=c++11 -c
registry.ii -S -o - | grep
_ZN9__gnu_cxx13new_allocatorISt10_List_nodeISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt3tr18weak_ptrIN7libecap7adapter7ServiceEEEEEE9constructISG_IRKSF_EEEvPT_DpOT0_

        call   
_ZN9__gnu_cxx13new_allocatorISt10_List_nodeISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt3tr18weak_ptrIN7libecap7adapter7ServiceEEEEEE9constructISG_IRKSF_EEEvPT_DpOT0_
        .section       
.text._ZN9__gnu_cxx13new_allocatorISt10_List_nodeISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt3tr18weak_ptrIN7libecap7adapter7ServiceEEEEEE9constructISG_IRKSF_EEEvPT_DpOT0_,"axG",@progbits,_ZN9__gnu_cxx13new_allocatorISt10_List_nodeISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt3tr18weak_ptrIN7libecap7adapter7ServiceEEEEEE9constructISG_IRKSF_EEEvPT_DpOT0_,comdat
        .weak  
_ZN9__gnu_cxx13new_allocatorISt10_List_nodeISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt3tr18weak_ptrIN7libecap7adapter7ServiceEEEEEE9constructISG_IRKSF_EEEvPT_DpOT0_
        .type  
_ZN9__gnu_cxx13new_allocatorISt10_List_nodeISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt3tr18weak_ptrIN7libecap7adapter7ServiceEEEEEE9constructISG_IRKSF_EEEvPT_DpOT0_,
@function
_ZN9__gnu_cxx13new_allocatorISt10_List_nodeISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt3tr18weak_ptrIN7libecap7adapter7ServiceEEEEEE9constructISG_IRKSF_EEEvPT_DpOT0_:
        .size  
_ZN9__gnu_cxx13new_allocatorISt10_List_nodeISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt3tr18weak_ptrIN7libecap7adapter7ServiceEEEEEE9constructISG_IRKSF_EEEvPT_DpOT0_,
.-_ZN9__gnu_cxx13new_allocatorISt10_List_nodeISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt3tr18weak_ptrIN7libecap7adapter7ServiceEEEEEE9constructISG_IRKSF_EEEvPT_DpOT0_
        .set   
_ZN9__gnu_cxx13new_allocatorISt10_List_nodeISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt3tr18weak_ptrIN7libecap7adapter7ServiceEEEEEE9constructISG_JRKSF_EEEvPT_DpOT0_,_ZN9__gnu_cxx13new_allocatorISt10_List_nodeISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt3tr18weak_ptrIN7libecap7adapter7ServiceEEEEEE9constructISG_IRKSF_EEEvPT_DpOT0_
markus@x4 tmp % /usr/x86_64-pc-linux-gnu/gcc-bin/5.3.1/g++ -std=c++11 -c
registry.ii -S -o - | grep
_ZN9__gnu_cxx13new_allocatorISt10_List_nodeISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt3tr18weak_ptrIN7libecap7adapter7ServiceEEEEEE9constructISG_IRKSF_EEEvPT_DpOT0_

        .weak  
_ZN9__gnu_cxx13new_allocatorISt10_List_nodeISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt3tr18weak_ptrIN7libecap7adapter7ServiceEEEEEE9constructISG_IRKSF_EEEvPT_DpOT0_
        .set   
_ZN9__gnu_cxx13new_allocatorISt10_List_nodeISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt3tr18weak_ptrIN7libecap7adapter7ServiceEEEEEE9constructISG_IRKSF_EEEvPT_DpOT0_,_ZN9__gnu_cxx13new_allocatorISt10_List_nodeISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENSt3tr18weak_ptrIN7libecap7adapter7ServiceEEEEEE9constructISG_JRKSF_EEEvPT_DpOT0_

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]