[GHC] #13171: panic on negative literal in case on Word
GHC
ghc-devs at haskell.org
Sun Feb 26 22:26:21 UTC 2017
#13171: panic on negative literal in case on Word
-------------------------------------+-------------------------------------
Reporter: rwbarton | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | 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/13171#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list