http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55471
gustavo <gustavo at atc dot ugr.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Host| |fedora 17 --- Comment #2 from gustavo <gustavo at atc dot ugr.es> 2012-11-26 18:52:29 UTC --- (In reply to comment #1) > what command are you using to compile? g++ -D _GLIBCXX_USE_NANOSLEEP -O3 -std=c++0x -Wall -Wl,--no-as-needed -lpthread -lrt bug.cc -o bug > what platform are you using? fedora 17 > what do you mean by "does not work"? Output must be "[thread number]: 0123456789" repeated for 10 threads for a second. The bug is easily discovered using: ./bug | sort | uniq [140087293904640]: 0123456789 [140087302297344]: 0123456789 [140087310690048]: 0123456789 [140087319082752]: 0123456789 [140087327475456]: 0123456789 [140087335868160]: 0123456789 [140087344260864]: 0123456789 [140087352653568]: 0123456789 [140087361046272]: 0123456789 [140087369438976 [140087369438976]: 01234[140087369438976]: 0123456789 [140087369438976]: 0123456[140087369438976]: 0123456789 [140087369438976]: 0123456789 Clearly the output is bunch of mixed strings instead of many "[thread number]: 0123456789"