[SciPy-dev] specfun compile errors on windows

Brett G. Olivier bgoli at sun.ac.za
Mon Jan 19 14:27:11 CST 2004


Hi

I have been looking into this problem and submitted it as a bug to the
MinGW people (I'll put the bug report at the end of this email). The reply
I got from them was:

=======================================================
Comment By: Danny Smith (dannysmith)
Date: 2004-01-10 09:45

This is a gcc bug that is fixed in gcc 3.3.3 and trunck sources.
Danny
=======================================================

I was hoping that mingw + gcc 3.3.3 would arrive soon enough and make this
go away?

Best regards
Brett

============================
Original bug report to mingw

Category: gcc
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Brett Olivier (bgoli)
Assigned to: Danny Smith (dannysmith)
Summary: g77 (gcc 3.3.1) emit_swap_insn internal compiler error

Initial Comment:
A specific combination (-O3 -funroll-loops -
march=pentium3) of compiler flags causes g77 to fail
with an internal compiler error with the attached routines

Compile command:
g77 -Wall -fno-second-underscore -O3 -funroll-loops -
march=pentium3 -malign-double -fomit-frame-pointer -c
specfun_error_func.f -o specfun_error_func.o

Output:
specfun_error_func.f: In subroutine `rmn2l':
specfun_error_func.f:32: warning: `sw' might be used
uninitialized in this funct
ion
specfun_error_func.f:38: warning: `lg' might be used
uninitialized in this funct
ion
specfun_error_func.f:45: warning: `np' might be used
uninitialized in this funct
ion
specfun_error_func.f:47: warning: `eps1' might be used
uninitialized in this fun
ction
specfun_error_func.f:69: warning: `eps2' might be used
uninitialized in this fun
ction
specfun_error_func.f:75: internal compiler error: in
emit_swap_insn, at reg-stac
k.c:987
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.mingw.org/bugs.shtml> for
instructions.

After playing around a bit I found the following two
workarounds that allow me to compile these two
functions.

Current workaround (1)
remove flag: -O3
=================

Compile command:
g77 -Wall -fno-second-underscore -funroll-loops -
march=pentium3
-malign-double -fomit-frame-pointer -c
specfun_error_func.f -o specfun_error_func.o

Output:
compiles OK

Current workaround (2)
remove flags: -funroll-loops -march=pentium3
=================

Compile command:
g77 -Wall -fno-second-underscore -O3 -malign-double -
fomit-frame-pointer -c specfun_error_func.f -o
specfun_error_func.o

Output:
compiles OK

Environment
=========

OS
==
Windows 2000 SP 4

gcc -v
======
Reading specs from c:/mingw/bin/../lib/gcc-
lib/mingw32/3.3.1/specs
Configured with: ../gcc/configure --with-gcc --with-gnu-
ld --with-gnu-as --host=
mingw32 --target=mingw32 --prefix=/mingw --enable-
threads --disable-nls --enable
-languages=c,c++,f77,objc,ada,java --disable-win32-
registry --disable-shared --e
nable-sjlj-exceptions --enable-libgcj --disable-java-awt -
-without-x --enable-ja
va-gc=boehm --disable-libgcj-debug --enable-
interpreter --enable-hash-synchroniz
ation
Thread model: win32
gcc version 3.3.1 (mingw special 20030804-1)

ld -v
====
GNU ld version 2.13.90 20030111

MinGW installer + updates
===================
MinGW-3.1.0-1.exe
binutils-2.13.90-20030111-1.tar.gz
gcc-core-3.3.1-20030804-1.tar.gz
gcc-g++-3.3.1-20030804-1.tar.gz
gcc-g77-3.3.1-20030804-1.tar.gz
mingw-runtime-3.2.tar.gz
w32api-2.4.tar.gz

----------------------------------------------------------------------

>Comment By: Danny Smith (dannysmith)
Date: 2004-01-10 09:45

Message:
Logged In: YES
user_id=11494

This is a gcc bug that is fixed in gcc 3.3.3 and trunck sources.
Danny

----------------------------------------------------------------------


>
>
> On Mon, 19 Jan 2004, Travis N. Vaught wrote:
>
>> Greetings,
>>
>> I finally have taken the time to look at our nightly builds of scipy for
>> win32 and noticed that specfun is not compiling--as some have reported
>> here:
>>
> Note that I am currently working on scipy_distutils and there might be
> a simple way to use different compiler flags for different sources.
> But in order to keep it simple, the sources should reside in different
> directories (that should contain setup.cfg files where it is possible
> to enable/disable optimization flags). So, this gives another solution
> if nothing else will work.
>
> Pearu
>
>
>
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-dev
>


-- 
Brett G. Olivier  (bgoli at sun . ac . za)

Biochemistry Dept, Stellenbosch University
Tel: +27-21-8085871    Fax: +27-218085863



More information about the Scipy-dev mailing list