Impossible compilation with primitive operations (possibly unsafeCoerce#)
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]
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.12.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |