http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42616
PcX <xunxun1982 at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xunxun1982 at gmail dot com --- Comment #12 from PcX <xunxun1982 at gmail dot com> 2011-07-10 10:03:48 UTC --- (In reply to comment #11) > FWIW, using mingw.org's gcc-4.5.2 release, the test passes: > > $ g++ -fopenmp omp_test.c -o omp_test -lpthread > $ ./omp_test.exe > OMP : All looks good > > Relevant installation data: > gcc-core-4.5.2-1-mingw32-bin > gcc-c++-4.5.2-1-mingw32-bin > libgcc-4.5.2-1-mingw32-dll-1 > libstdc++-4.5.2-1-mingw32-dll-6 > libgomp-4.5.2-1-mingw32-dll-1 > mingwrt-3.18-mingw32-dll > mingwrt-3.18-mingw32-dev > w32api-3.17-2-mingw32-dev > pthreads-w32-2.8.0-3-mingw32-dev > libpthread-2.8.0-3-mingw32-dll-2 > > I believe this is because TLS support was added to the mingw(32) runtime in > late Jan 2010, thanks to Kai's work: > http://thread.gmane.org/gmane.comp.gnu.mingw.devel/3550 > > (Although a full compiler suite, and mingw runtime, with TLS support was not > officially released until March 2010) I don't thinks so. Because mingw64 crt also contains TLS support written by Kai, but mingw64 crt also use the code to crash.