[GHC] #8695: Arithmetic overflow from (minBound :: Int) `quot` (-1)

GHC ghc-devs at haskell.org
Tue Jun 2 23:21:15 UTC 2015


#8695: Arithmetic overflow from (minBound :: Int) `quot` (-1)
-------------------------------------+-------------------------------------
        Reporter:  rleslie           |                   Owner:
            Type:  feature request   |                  Status:  closed
        Priority:  normal            |               Milestone:  7.12.1
       Component:  Core Libraries    |                 Version:  7.6.3
      Resolution:  wontfix           |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  Incorrect result  |  Unknown/Multiple
  at runtime                         |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:  #1042             |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 But yes, it would certainly be good to explicitly call attention to the
 case of {{{minBound `div` (-1)}}} somewhere, as even if the behavior is
 expected once you think of it, it's not at all obvious that this special
 case exists if you haven't encountered it before.

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


More information about the ghc-tickets mailing list