Don't use -O3 on Mingw, as people report it as unreliable. Use -O2