id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related
3437,Optimizer creates space leak on simple code,lilac,,"The following code should run in constant space:
{{{
{-# LANGUAGE BangPatterns #-}
go (x:xs) !n !k = go xs 0 (n+k+1)
main = print (go (repeat 'x') 0 0 :: Int)
}}}
However, when compiled with -O2, it rapidly eats up the heap. If n and k are forced to be Int rather than Integer, the problem disappears.

Core for the above with -O2 is here: http://hpaste.org/fastcgi/hpaste.fcgi/view?id=8268 [[BR]]
The original code from which this was taken is here: http://hpaste.org/fastcgi/hpaste.fcgi/view?id=8266",bug,closed,normal,,Compiler,6.10.3,fixed,,,Linux,x86_64 (amd64),Runtime performance bug,Unknown,simplCore/should_run/T3437,,,
