#12433: GHCi produces incorrect results when evaluating with compiled code -------------------------------------+------------------------------------- Reporter: diatchki | Owner: simonmar Type: bug | Status: new Priority: highest | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: ghci, dynamic | linking, compiled code Operating System: Linux | Architecture: x86_64 Type of failure: Incorrect result | (amd64) at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2529 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Simon Marlow <marlowsd@…>): In [changeset:"86836a2ecc089b917866a2cb65b716fd5f04cc56/ghc" 86836a2/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="86836a2ecc089b917866a2cb65b716fd5f04cc56" Fix codegen bug in PIC version of genSwitch (#12433) Summary: * getNonClobberedReg instead of getSomeReg, because the reg needs to survive across t_code * Use a new reg for the table offset calculation instead of clobbering the reg returned by expr (this was the bug affecting #12433) Test Plan: New unit test; validate Reviewers: rwbarton, bgamari, austin, erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2529 GHC Trac Issues: #12433 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12433#comment:13> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler