[GHC] #9533: Signed/unsigned integer difference between compiled and interpreted code

GHC ghc-devs at haskell.org
Sun Feb 26 22:26:21 UTC 2017


#9533: Signed/unsigned integer difference between compiled and interpreted code
-------------------------------------+-------------------------------------
        Reporter:  MichaelBurge      |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  high              |            Milestone:
       Component:  Compiler          |              Version:  7.8.3
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:  x86_64
 Type of failure:  Incorrect result  |  (amd64)
  at runtime                         |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ben Gamari <ben@…>):

 In [changeset:"6dfc5ebf70df8f0fdccc5004d914b777f21f3b72/ghc" 6dfc5eb/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="6dfc5ebf70df8f0fdccc5004d914b777f21f3b72"
 Ensure that Literals are in range

 This commit fixes several bugs related to case expressions
 involving numeric literals which are not in the range of values of
 their (fixed-width, integral) type.

 There is a new invariant on Literal: The argument of a MachInt[64]
 or MachWord[64] must lie within the range of the corresponding
 primitive type Int[64]# or Word[64]#, as defined by the target machine.
 This invariant is enforced in mkMachInt[64]/mkMachWord[64] by wrapping
 the argument to the target type's range if necessary.

 Test Plan: Test Plan: make slowtest TEST="T9533 T9533b T9533c T10245
 T10246"

 Trac issues: #9533, #10245, #10246, #13171

 Reviewers: simonmar, simonpj, austin, bgamari, nomeata

 Reviewed By: bgamari

 Subscribers: thomie, rwbarton

 Differential Revision: https://phabricator.haskell.org/D810
 }}}

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


More information about the ghc-tickets mailing list