#4090: Impossible compilation with primitive operations (possibly unsafeCoerce#)
------------------------+---------------------------------------------------
Reporter: malosh | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 6.12.1 | Keywords:
Os: MacOS X | Testcase:
Architecture: x86 | Failure: Compile-time crash
------------------------+---------------------------------------------------
On the following code :
ulp#::Double#->Double#
ulp# d=
let w=unsafeCoerce# d :: Word64#
e=(unsafeCoerce# (uncheckedShiftRL64# w 52#)) `and#` 0x7ff##
in
if e `gtWord#` 0x034## then
unsafeCoerce# (unsafeCoerce# (e `minusWord#` (0x034##))
`uncheckedShiftL64#` 52#)
else
unsafeCoerce# (1## `uncheckedShiftL#` ((unsafeCoerce# e) -# 1#))
GHC 6.12.1 returns :
ghc: panic! (the 'impossible' happened)
(GHC version 6.12.1 for i386-apple-darwin):
getRegister(x86) I64[BaseReg + 72]
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4090>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs