https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101823
--- Comment #2 from bootmgr at 163 dot com <bootmgr at 163 dot com> --- I reconfigured gcc with --enable-threads=win32 (not --enable-threads=posix) and this gcc can compile the program correctly.The posix thread model cannot.