Using mingw-w32-bin_i686-mingw_20111219.zip, mingw64 GCC can not use GCC builtins under -O0 optimization level preventing the creation of any PEs which do not link to the CRT. Under all -O flags (I tried -O1 -O2 -Ofast ) except -O0, the program will compile. A sample program is included. It is called memcpy.c. It was compiled with i686-w64-mingw32-gcc.exe memcpy.c -nostdlib -lkernel32 -o memcpy.exe -v -Wall -O0" . Mingw64 GCC converted the __builtin_memcpy function to memcpy, which is a CRT function, then fail when they can't link to the CRT. Mingw.org GCC does NOT exhibit this.
I brought up the problem in these 2 places before.