
#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:16 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
Alex, if you manage to put together a tentative patch, feel free to check it in to the branch and push. That will trigger the CI machinery. 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:17 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler