#476 g77 (gcc 3.3.1) emit_swap_insn internal compiler error

closed-fixed
gcc (462)
2004-01-09
2004-01-09
No

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 5

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

Discussion

  • Brett Olivier

    Brett Olivier - 2004-01-09

    specfun_error_func.f fortran source

     
  • Earnie Boyd

    Earnie Boyd - 2004-01-09
    • labels: 456608 --> gcc
    • assigned_to: earnie --> dannysmith
     
  • Danny Smith

    Danny Smith - 2004-01-09
    • status: open --> closed-fixed
     
  • Danny Smith

    Danny Smith - 2004-01-09

    Logged In: YES
    user_id=11494

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

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks