Silly IO problem

skaller skaller at users.sourceforge.net
Thu Nov 3 07:56:37 EST 2005


On Thu, 2005-11-03 at 09:49 +0100, Mirko Rahn wrote:
> > It prints n, rather than tak(3n,2n,n).
> 
> ??? No:
> 
> *Main> :set args 0
> *Main> main
> 0.0
> *Main> :set args 1
> *Main> main
> 2.0
> *Main> :set args 2
> *Main> main
> 3.0
> *Main> :set args 3
> *Main> main
> 6.0
> 
> The same with some versions of ghc.

Ah .. it seems to be a bug in gcc 4.0

The Glorious Glasgow Haskell Compilation System, version 6.4
[running on Ubuntu which uses Debian package]

gcc (GCC) 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu9)
x86_64

Summary: gcc does not work with GHC 6.4 on x86_64 with
optimisation higher than -O1

Perhaps the Evil Mangler is not working, or, possibly
the version isn't even registered. 

----------------------------------------------
skaller at rosella:/work/felix/flx$ ghc -O3 -fvia-C -optc -O3 -o
speed/exes/ghc/takfp speed/src/haskell/takfp.hs

skaller at rosella:/work/felix/flx/speed/exes/ghc$ ./takfp 8
8.0

skaller at rosella:/work/felix/flx$ ghc -fvia-C -o speed/exes/ghc/takfp
speed/src/haskell/takfp.hs
skaller at rosella:/work/felix/flx$ speed/exes/ghc/takfp 8 9.0
skaller at rosella:/work/felix/flx$ speed/exes/ghc/takfp 3
6.0

skaller at rosella:/work/felix/flx$ ghc -O3 -fvia-C -optc -O2 -o
speed/exes/ghc/takfp speed/src/haskell/takfp.hs
skaller at rosella:/work/felix/flx$ speed/exes/ghc/takfp 3 
3.0

skaller at rosella:/work/felix/flx$ ghc -O3 -fvia-C -optc -O1 -o
speed/exes/ghc/takfp speed/src/haskell/takfp.hs
skaller at rosella:/work/felix/flx$ speed/exes/ghc/takfp 3
6.0


-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net



More information about the Glasgow-haskell-users mailing list