[GHC] #9390: Inlining prevents evaluation of ignored parts of unboxed tuples

GHC ghc-devs at haskell.org
Tue Aug 5 20:49:24 UTC 2014


#9390: Inlining prevents evaluation of ignored parts of unboxed tuples
-------------------------------------+-------------------------------------
              Reporter:  snoyberg    |            Owner:
                  Type:  bug         |           Status:  new
              Priority:  normal      |        Milestone:  7.8.4
             Component:  Compiler    |          Version:  7.8.3
            Resolution:              |         Keywords:
      Operating System:  Linux       |     Architecture:  x86_64 (amd64)
       Type of failure:  Incorrect   |       Difficulty:  Unknown
  result at runtime                  |       Blocked By:
             Test Case:              |  Related Tickets:
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 I have this 95% done, but keep getting distracted.  I hope to commit my
 fix on Thursday. It can go in 7.8.4 if we ever make such a release.

 Meanwhile, notice that you are in effect using an inlined version of
 `unsafePerformIO`: your function `inlineWriteB` conjures up a `realWorld#`
 and then discards it again.  If you use the real `unsafePerformIO` (which
 is not inlined until much later if at all) I think the problem will go
 away.  That might be a workaround.

 Simon

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9390#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list