[GHC] #7988: Big integers crashing integer-simple on qnxnto-arm
GHC
ghc-devs at haskell.org
Sun Jun 16 23:11:39 CEST 2013
#7988: Big integers crashing integer-simple on qnxnto-arm
--------------------------+-------------------------------------------------
Reporter: singpolyma | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 7.7 | Keywords:
Os: QNX | Architecture: arm
Failure: Runtime crash | Blockedby:
Blocking: | Related:
--------------------------+-------------------------------------------------
Comment(by singpolyma):
The following code *works*, so the integer can exist and operations can be
done on it, but certain operations apparently cause it to fail:
{{{
module Main(main) where
import Data.Char
newShow' :: Integer -> [Int]
newShow' 0 = []
newShow' x = (fromIntegral $ x `mod` 10) : newShow' (x `div` 10)
newShow :: Integer -> String
newShow x = map intToDigit $ reverse (newShow' x)
main :: IO ()
main = print $ newShow x
where
x =
169821641172389640937095636777672117931888945045504182713271897430274187839083732143233634367563316254925040331580602942790529924419031237257992694047545188803054325440702792009735658578224936744314329623399862853427161588994478038000957583036049445212750560294647972107700330648403394932373528288706138101730866129542001812796094504052779945357555018210304989340497464935845180607042646690920787035715174921382511732745931975718868480005317353569848454618331425749699355019762926384123909468814180690222898222556785716853422930906736084397064171894642825018414586574929919999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7988#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list