Skip to content
Snippets Groups Projects
Commit a7571a74 authored by Ben Gamari's avatar Ben Gamari Committed by Marge Bot
Browse files

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
No related branches found
No related tags found
No related merge requests found
...@@ -6,12 +6,18 @@ import System.Environment ...@@ -6,12 +6,18 @@ import System.Environment
main = do main = do
[n] <- fmap (fmap read) getArgs [n] <- fmap (fmap read) getArgs
case g n of 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 -- a deep stack in which each frame is an unboxed tuple-return, to exercise
-- the stack underflow machinery. -- the stack underflow machinery.
g :: Int -> (# Int,Float,Double,Int#,Float#,Double#,Int,Float,Double #) g :: Int -> (# Int,Float,Double,
g 0 = (# 1, 2.0, 3.0, 1#, 2.0#, 3.0##, 1, 2.0, 3.0 #) 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 g x = case g (x-1) of
(# a, 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 #) (# a+1, b, c, d, e, f, g, h, i, j, k, l #)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment