[GHC] #7411: Exceptions are optimized away in certain situations

GHC ghc-devs at haskell.org
Wed May 9 08:08:18 UTC 2018


#7411: Exceptions are optimized away in certain situations
-------------------------------------+-------------------------------------
        Reporter:  SimonHengel       |                Owner:  tdammers
            Type:  bug               |               Status:  new
        Priority:  high              |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  7.6.1
      Resolution:                    |             Keywords:  seq, deepseq,
                                     |  evaluate, exceptions
Operating System:  Linux             |         Architecture:  x86_64
                                     |  (amd64)
 Type of failure:  Incorrect result  |            Test Case:
  at runtime                         |  simplCore/should_fail/T7411
      Blocked By:                    |             Blocking:
 Related Tickets:  #5129             |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 > I don't see anything problematic about the floating

 If we eta-expand `lvl_s2Yo` its value goes from possibly-bottom (if there
 are bottoms in the list, which there are) to definitely non-bottom. As a
 result `seq# lvl_s2yo e` is optimised to `e`; which is incorrect here
 (that is precisely the bug reported), but absolutely fine for definite
 non-values in the first argument.

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


More information about the ghc-tickets mailing list