
#14677: Code generator does not correctly tag a pointer -------------------------------------+------------------------------------- Reporter: simonpj | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: 14626 Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by heisenbug): Replying to [comment:15 alexbiehl]:
Ha, got it!
`evtWrite` is defined as
[snip] Yeah, a simple `main = print evtWrite` will show the issue. I just had a long dog walk, thanks for reducing this! Yesterday I checked the diffs in the generated Cmm and the '''only''' change was that the `evtWrite_closure+1` gets passed (instead of `evtWrite_closure`). So your analysis sounds reasonable. The callee thinks it got the dereferenced `Int`, but actually it is a tagged pointer. This is somehow related to the fact that the `newtype` is defined in another module. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14677#comment:16 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler