https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59675
Jan Kratochvil <jan.kratochvil at redhat dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|4.8.2 |9.2.1 --- Comment #6 from Jan Kratochvil <jan.kratochvil at redhat dot com> --- libstdc++-devel-9.2.1-1.fc31.x86_64 cat >gcc59675b.C <<EOH #include <memory> int main() { std::shared_ptr<int> sp; return *sp; } EOH g++ -o gcc59675b gcc59675b.C -Wall -g -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC $ ./gcc59675b 2>/dev/null /usr/include/c++/9/bits/shared_ptr_base.h:1007: std::__shared_ptr_access<_Tp, _Lp, <anonymous>, <anonymous> >::element_type& std::__shared_ptr_access<_Tp, _Lp, <anonymous>, <anonymous> >::operator*() const [with _Tp = int; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic; bool <anonymous> = false; bool <anonymous> = false; std::__shared_ptr_access<_Tp, _Lp, <anonymous>, <anonymous> >::element_type = int]: Assertion '_M_get() != nullptr' failed. Aborted $ ./gcc59675b >/dev/null Aborted