Commit 26e5aafd authored by Simon Marlow's avatar Simon Marlow
Browse files

Add test for #7361

parent 4aa886d5
{-# LANGUAGE MagicHash #-}
import GHC.Exts
main = print $ map f [1,256,65536,minBound,maxBound]
f (I# x#) =
[ I# (narrow8Int# (narrow16Int# x#))
, I# (narrow8Int# (narrow32Int# x#))
, I# (narrow16Int# (narrow8Int# x#))
, I# (narrow16Int# (narrow32Int# x#))
, I# (narrow32Int# (narrow8Int# x#))
, I# (narrow32Int# (narrow16Int# x#))]
[[1,1,1,1,1,1],[0,0,0,256,0,256],[0,0,0,0,0,0],[0,0,0,0,0,0],[-1,-1,-1,-1,-1,-1]]
......@@ -102,3 +102,5 @@ test('T7319', [ extra_ways(['prof']), only_ways(['prof']), exit_code(1),
extra_run_opts('+RTS -xc') ], compile_and_run, [''])
test('Word2Float32', unless_wordsize(32, skip), compile_and_run, [''])
test('Word2Float64', unless_wordsize(64, skip), compile_and_run, [''])
test('T7361', normal, 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