From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26038 invoked by alias); 30 Mar 2012 14:42:41 -0000 Received: (qmail 26030 invoked by uid 22791); 30 Mar 2012 14:42:40 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 30 Mar 2012 14:42:17 +0000 From: "wyldckat+gcc.bugzilla at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/52790] New: Problems using x86_64-w64-mingw-w32-gfortran with mcmodel=large and medium Date: Fri, 30 Mar 2012 15:10:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: wyldckat+gcc.bugzilla at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-03/txt/msg02674.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D52790 Bug #: 52790 Summary: Problems using x86_64-w64-mingw-w32-gfortran with mcmodel=3Dlarge and medium Classification: Unclassified Product: gcc Version: 4.6.3 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: fortran AssignedTo: unassigned@gcc.gnu.org ReportedBy: wyldckat+gcc.bugzilla@gmail.com Created attachment 27043 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=3D27043 Example that works on Linux x86_64 but not with mingw-w64 on/for Windows Attached is "test.f", an example file of Fortran code that will build just = fine on Linux x86_64, but it will not build with "x86_64-w64-mingw32-gfortran.ex= e" on Windows or with a cross-compilation "build kit" on Linux. Commands for building this test file: - on several Linux x86_64 boxes with various gcc versions, all of these wor= k: 1. gfortran -O3 test.f 2. gfortran -O3 -mcmodel=3Dmedium test.f 3. gfortran -O3 -mcmodel=3Dlarge test.f the last one is what I have to use with the real code, due to the number and dimensions of the pre-allocated arrays. - on Windows or cross-compiled from Linux, all of these don't work: 1. x86_64-w64-mingw32-gfortran.exe -O3 test.f 2. x86_64-w64-mingw32-gfortran.exe -O3 -mcmodel=3Dmedium test.f 3. x86_64-w64-mingw32-gfortran.exe -O3 -mcmodel=3Dlarge test.f The errors vary depending on option. In order, the summary "complaints" are: 1. In function `pre_c_init' [...] crtexe.c [...] relocation truncated to fit: R_X86_64_PC32 against symbol ... 2. as.exe: BFD (GNU Binutils) 2.22.51.20111217 assertion fail [...] coff-x86_64.c [...] cannot represent relocation type BFD_RELOC_386_GOTPC 3. as.exe [...] cannot represent relocation type BFD_RELOC_X86_64_GOTPC64 Tested build systems: - custom build: binutils 2.21 + gcc 4.5.3 (gmp 4.3.2 + mpfr 2.4.2 + mpc 0.8= .2) + mingw-w64 CRT v1.x - custom build: binutils 2.22 + gcc 4.6.3 (gmp 5.0.2 + mpfr 3.0.1 + mpc 0.9= ) + mingw-w64 CRT v2.x - automatic build from the mingw-w64 project (Gcc 4.7.0 and binutils 2.22.51.20111217), namely with the package: mingw-w64-bin_i686-mingw_20111220.zip This was initially reported on the mingw-w64 project bug tracker: http://sourceforge.net/tracker/?func=3Ddetail&atid=3D983354&aid=3D3505342&g= roup_id=3D202880 The answer was and I quote: =C2=ABThis bug report is invalid on this list. You can open a feature-req= uest on gcc's bugtracker for it, but x64 windows target is using small-memory model only. larget memory-model isn't supported at all, and medium is at least absolutely untested. Therefore I close this bug as invalid, as it has nothing to do with mingw= -w64 itself.=C2=BB