Commit a7571a74 authored by Ben Gamari's avatar Ben Gamari 🐢 Committed by Marge Bot

testsuite: Increase width of stack003 test

Previously the returned tuple seemed to fit in registers on amd64. This
meant that non-moving collector bug would cause the test to fail on i386
yet not amd64.
parent eb7b233a
......@@ -6,12 +6,18 @@ import System.Environment
main = do
[n] <- fmap (fmap read) getArgs
case g n of
(# a, b, c, d, e, f, g, h, i #) -> print a
(# a, b, c, d, e, f, g, h, i, j, k, l #) -> print a
-- a deep stack in which each frame is an unboxed tuple-return, to exercise
-- the stack underflow machinery.
g :: Int -> (# Int,Float,Double,Int#,Float#,Double#,Int,Float,Double #)
g 0 = (# 1, 2.0, 3.0, 1#, 2.0#, 3.0##, 1, 2.0, 3.0 #)
g :: Int -> (# Int,Float,Double,
Int#,Float#,Double#,
Int,Float,Double,
Int#,Float#,Double# #)
g 0 = (# 1, 2.0, 3.0,
1#, 2.0#, 3.0##,
1, 2.0, 3.0,
1#, 2.0#, 3.0## #)
g x = case g (x-1) of
(# a, b, c, d, e, f, g, h, i #) ->
(# a+1, b, c, d, e, f, g, h, i #)
(# a, b, c, d, e, f, g, h, i, j, k, l #) ->
(# a+1, b, c, d, e, f, g, h, i, j, k, l #)
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