https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77748
--- Comment #15 from Bernd Edlinger <bernd.edlinger at hotmail dot de> --- Thanks. Again I could reproduce the issue with the assembler flle. This time it fails in a memcmp. Apparently the _M_string_length is uninitialized, but used in memcmp. Can you try this? Index: pr77550.C =================================================================== --- pr77550.C (revision 240540) +++ pr77550.C (working copy) @@ -229,15 +229,17 @@ struct _Alloc_hider { _Alloc_hider(pointer, allocator<char> && = allocator<char>()); } _M_dataplus; - size_type _M_string_length; + size_type _M_string_length = 0; enum { _S_local_capacity = 15 } _M_local_buf[_S_local_capacity]; - pointer _M_local_data(); - void _M_set_length(size_type); - basic_string() : _M_dataplus(_M_local_data()) { _M_set_length(0); } + basic_string() : _M_dataplus(0) {} basic_string(const basic_string &) : _M_dataplus(0) {} size_type size() { return _M_string_length; } char *data() const {} }; +//template<> basic_string<char, std::char_traits<char>, std::allocator<char>>:: +//_Alloc_hider::_Alloc_hider(char*, std::allocator<char>&&) {} +extern "C" void +_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderC1EPcOS3_ (...) {} } template <typename _CharT> int operator==(basic_string<_CharT> &p1, const basic_string<_CharT> &p2) {