Attempting to do foreign import with unboxed tuple return type causes GHC panic
stefan@stefans:/tmp$ ghc -ddump-asm -fglasgow-exts X.hs
ghc-6.7.20070829: panic! (the 'impossible' happened)
(GHC version 6.7.20070829 for i386-unknown-linux):
resultWrapper
(# base:GHC.Prim.Int#{(w) tc 3G},
base:GHC.Prim.Int#{(w) tc 3G},
base:GHC.Prim.Int#{(w) tc 3G} #)
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
stefan@stefans:/tmp$ cat X.hs
module X where
import GHC.Exts
foreign import ccall unsafe "foo" foo :: Int# -> Int# -> Int# -> (# Int# , Int# , Int# #)
stefan@stefans:/tmp$
- 6.1 and 6.4.2 are also affected.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.7 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (FFI) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | sorear |
| Operating system | |
| Architecture |