Commit 03ee7cd1 authored by Simon Marlow's avatar Simon Marlow

add test from #5363

parent d5593000
import Data.Array.Unboxed
main = do
let l1 = [1..10] :: [Int]
let l2 = [ map (i+) l1 | i <- [1..500000] ]
let l3 = map (\l -> listArray (1,length l) l) l2 :: [UArray Int Int]
print $ accumulate l3 0
accumulate [] rv = rv
accumulate (h:t) rv =
let nextRv = (rv + sum (elems h)) in
accumulate t $! nextRv
...@@ -107,3 +107,9 @@ test('callstack001', ...@@ -107,3 +107,9 @@ test('callstack001',
test('callstack002', test('callstack002',
[ req_profiling, extra_ways(['prof']), only_ways(prof_ways) ], [ req_profiling, extra_ways(['prof']), only_ways(prof_ways) ],
compile_and_run, ['-fprof-auto-calls -fno-full-laziness -fno-state-hack']) compile_and_run, ['-fprof-auto-calls -fno-full-laziness -fno-state-hack'])
# Should not stack overflow with -prof -auto-all
test('T5363',
[ req_profiling, extra_ways(['prof']), only_ways(prof_ways) ],
compile_and_run, [''])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment