https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118811
--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> --- So looking into this slightly, tzdb_list deconstructor will call the deconstructor of shared_ptr<_Node>. But that should always be called after the deconstructor of BackgroundThread. Oh I get the failure on the trunk with -static-libstdc++ . So there is an ordering issue here.