I just ran that and updated my MSYS environment to the latest. Then copied the code in post #1 into main.cpp. Then:
Originally Posted by Codeplug
Same result if I compile and run outside of MSYS - runs to 99 every time.
$ g++ -Wall -O0 -g3 main.cpp -lpthread
$ a.exe | tail
Do you have any other versions of MinGW installed that aren't in C:\MinGW?
Your PATH environment variable should have "C:\MinGW\Bin" at the front of the PATH string.
You may need to uninstall anything with "MinGW" in it from control panel. Then delete C:\MinGW completely (plus any other MinGW installs). Then re-install.