https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486
--- Comment #6 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- Thanks. > '--with-bugurl=https://github.com/msys2/MINGW-packages/issues' > '--with-gnu-as' '--with-gnu-ld' '--with-boot-ldflags=-pipe > -Wl,--dynamicbase,--nxcompat,--no-seh -Wl,--large-address-aware > -Wl,--disable-dynamicbase -static-libstdc++ -static-libgcc' > 'LDFLAGS_FOR_TARGET=-pipe -Wl,--dynamicbase,--nxcompat,--no-seh > -Wl,--large-address-aware' > '--enable-linker-plugin-flags=LDFLAGS=-static-libstdc++\\ -static-libgcc\\ > -pipe\\ -Wl,--dynamicbase,--nxcompat,--no-seh\\ -Wl,--large-address-aware\\ > -Wl,--stack,12582912' '--disable-sjlj-exceptions' '--with-dwarf2' > 'build_alias=i686-w64-mingw32' 'host_alias=i686-w64-mingw32' > 'target_alias=i686-w64-mingw32' 'CC=gcc' 'CFLAGS=-march=i686 -mtune=generic > -O2 -pipe' 'LDFLAGS=-pipe -Wl,--dynamicbase,--nxcompat,--no-seh > -Wl,--large-address-aware -Wl,--disable-dynamicbase' > 'CPPFLAGS=-D__USE_MINGW_ANSI_STDIO=1' 'CXX=g++' 'CXXFLAGS=-march=i686 > -mtune=generic -O2 -pipe' > '--enable-languages=c,ada,c++,fortran,jit,lto,objc,obj-c++'" AFAICS the failure occurs during stage #2 so the stage #1 compiler might be miscompiled by the base compiler. Could you change the -O2 into -O1 above? If this still does not work, could you change it into -O0?