http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57495
Bug ID: 57495 Summary: Compiling mingw targets with -mcmodel=large causes assert Product: gcc Version: 4.7.4 Status: UNCONFIRMED Severity: major Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: tim at marlettesoftware dot com When compiling a program with either Lahey-GNU Fortran (4.7.3) or a mingw personal build (4.7.2) using the -mcmodel=large switch, the following assertion is triggered: C:\gccbuild\test\gfortran>echo end > end.f90 C:\gccbuild\test\gfortran>gfortran -mcmodel=large -o end.exe end.f90 c:/msys/mingw32-64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.3/../../../../x86_64-w64-mingw32/bin/as.exe: BFD (Shasta) 2.23. 52.20130412 assertion fail ../../../gcc-4_7-branch/binutils/bfd/coff-x86_64.c:682 C:\Users\Builder7\AppData\Local\Temp\ccMjbWKn.s: Assembler messages: C:\Users\Builder7\AppData\Local\Temp\ccMjbWKn.s:29: Error: cannot represent relocation type BFD_RELOC_X86_64_GOTPC64 Not sure if it will help, but here are my compiler specs: C:\gccbuild\test\gfortran>gfortran -v Using built-in specs. COLLECT_GCC=gfortran COLLECT_LTO_WRAPPER=c:/msys/mingw32-64/bin/../libexec/gcc/x86_64-w64-mingw32/4.7.3/lto-wrapper.exe Target: x86_64-w64-mingw32 Configured with: ../gcc-4_7-branch/configure --prefix=/mingw32-64 --with-sysroot=/mingw32-64 --build=i686-w64-mingw32 --host=i686-w64-mingw32 --target=x86_64-w64-mingw32 --enable-targets=x86_64-w64-mingw32,i686-w64-mingw32 --disable-shared --enable-static --disable-win32-registry --enable-version-specific-runtime-libs --enable-languages=c,fortran,lto --enable-libgomp --enable-lto --enable-libssp --enable-fat --enable-checking=release --enable-cloog-backend=isl --disable-cloog-version-check --disable-ppl-version-check --with-gcc --with-gnu-as --with-gnu-ld --with-ppl --with-dwarf2 --with-iconv --with-pkgversion=Shasta --with-bugurl=supp...@lahey.com --with-host-libstdcxx='-L/c/mingw32/lib -lstdc++ -lsupc++' --disable-werror --disable-bootstrap --disable-build-with-cxx Thread model: win32 gcc version 4.7.3 20130225 (prerelease) (Shasta)