optimized compilation fails with gcc 3.4.3 under solaris

Christian Maeder maeder at tzi.de
Wed Nov 17 09:01:00 EST 2004


Hi,

when I compile "Hello World" optimized, I get error messages and an 
unusable binary. Everything works fine with gcc version 3.3.5 (or 
unoptimized).

Cheers Christian


maeder at leo -> uname -a
SunOS leo 5.8 Generic_117000-05 sun4u sparc SUNW,Sun-Fire-280R
maeder at leo -> ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.2.1
maeder at leo -> gcc -v
Reading specs from 
/export/software/mirror/sparc-solaris/lang/bin/../lib/gcc/sparc-sun-solaris2.8/3.4.3/specs
Configured with: ../gcc-3.4.3/configure --prefix=/usr/local/lang 
-program-suffix=_3.4.3 --with-as=/usr/ccs/bin/as 
--with-ld=/usr/ccs/bin/ld --enable-version-specific-runtime-libs 
--enable-languages=c,c++,f77 --enable-shared=libstdc++ --disable-nls
Thread model: posix
gcc version 3.4.3
maeder at leo -> ghc --make Main.hs -O
Chasing modules from: Main.hs
Compiling Main             ( Main.hs, Main.o )
/tmp/ghc14393.hc: In function `__stginit_Main':
/tmp/ghc14393.hc:5: note: if this code is reached, the program will abort
/tmp/ghc14393.hc: In function `__stginit_ZCMain':
/tmp/ghc14393.hc:12: note: if this code is reached, the program will abort
/tmp/ghc14393.hc: In function `Main_a_entry':
/tmp/ghc14393.hc:33: note: if this code is reached, the program will abort
/tmp/ghc14393.hc: In function `Main_main_slow':
/tmp/ghc14393.hc:49: note: if this code is reached, the program will abort
/tmp/ghc14393.hc: In function `Main_main_entry':
/tmp/ghc14393.hc:64: note: if this code is reached, the program will abort
/tmp/ghc14393.hc: In function `ZCMain_main_slow':
/tmp/ghc14393.hc:79: note: if this code is reached, the program will abort
Linking ...
maeder at leo -> ./a.out
Illegal Instruction


More information about the Glasgow-haskell-users mailing list