http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60178
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Component|c++ |libstdc++ Resolution|--- |WORKSFORME --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- You need to use -pthread The program has undefined behaviour anyway due to locking the same mutex twice in a single thread.