This bug affects 4.4.0, 4.4.1, and 4.5.0. I have not tried earlier versions.
The bug's result is a very simple: $ ./gcc /home/Peter/test.c -v Using built-in specs. Target: x86_64-w64-mingw32 Configured with: ../configure --host=x86_64-w64-mingw32 --target=x86_64-w64-ming w32 --enable-targets=x86_64-w64-mingw32,x86_64-pc-mingw32,i686-pc-mingw32 --pref ix=/usr/system64 --with-sysroot=/usr/system64 --enable-languages=c,c++,objc,obj- c++,fortran --disable-nls --disable-libgjc --disable-boehm-gc --disable-objc-gc --enable-fully-dynamic-strings --enable-shared --enable-shared-libgcc --enable-s hared-libstdcxx --enable-__cxa_atexit --enable-libffi --with-tune=k8 Thread model: win32 gcc version 4.5.0 20090619 (experimental) (GCC) COLLECT_GCC_OPTIONS='-v' '-mtune=k8' c:/system64/system64-broken/bin/../libexec/gcc/x86_64-w64-mingw32/4.5.0/cc1.exe -quiet -v -iprefix c:\system64\system64-broken\bin\../lib/gcc/x86_64-w64-mingw3 2/4.5.0/ -isysroot c:\system64\system64-broken\bin\../../system64 C:/system64/ho me/Peter/test.c -quiet -dumpbase test.c -mtune=k8 -auxbase test -version -o C:\U sers\Peter\AppData\Local\Temp\ccZz3Aej.s gcc.exe: CreateProcess: No such file or directory or $ ./gcc /home/Peter/test.c gcc.exe: CreateProcess: No such file or directory $ ./gcc /home/Peter/test.c -o test.o gcc.exe: CreateProcess: No such file or directory After much testing, building a successful compiler using Ubuntu Linux, and making it through Stage 1 building native in Cygwin or MSys, I finally discovered the cause when I tried to add -O2 to my cross-compiled Ubuntu 1-stage session identical to the prior. The problem affects all the other drivers as well. The libexec compilers are not affected - at least not in a 1-Stage Ubuntu Linux cross-compile. I hope "major" is not out-of-line, I don't know if you care about native Windows x64 support, but it is straight-out broken. There is one solution: I have succeeded by using --enable-threads=posix with Mingw-w64 ported win32-pthreads. See also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39356#c0, and my about-to-post -DCLOOG_PPL_BACKEND causes the above in Stage 1. -- Summary: Bootstrap for native build always fails in Stage 2 due to -O2 optimization Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: major Priority: P3 Component: driver AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: xenofears at gmail dot com GCC build triplet: x86_64-w64-mingw32, i686-pc-cygwin, i686-pc-mingw32 GCC host triplet: x86_64-w64-mingw32, x86_64-pc-mingw32 GCC target triplet: x86_64-w64-mingw32, x86_64-pc-mingw32 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40513