Same result if I compile and run outside of MSYS - runs to 99 every time.Code:$ g++ -Wall -O0 -g3 main.cpp -lpthread $ a.exe | tail main.cpp:24 trial 96 main.cpp:24 trial 97 main.cpp:24 trial 98 main.cpp:24 trial 99 main.cpp:24 done!
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.