stg_floatToWord32zh: zero-extend the Word32 (#16617)
[ghc.git] / testsuite / tests / codeGen / should_run / T16617.hs
1 import GHC.Float
2
3 main :: IO ()
4 main = do
5 -- As per #16617, Word32s should be non-negative
6 print $ castFloatToWord32 (-1)
7 print $ toInteger (castFloatToWord32 (-1)) > 0
8 -- For completeness, so should Word64s
9 print $ castDoubleToWord64 (-1)
10 print $ toInteger (castDoubleToWord64 (-1)) > 0