[GHC] #10517: Unexpected behavior of unsafeCoerce converting Word32 to Word8

GHC ghc-devs at haskell.org
Sun Jun 14 18:13:48 UTC 2015


#10517: Unexpected behavior of unsafeCoerce converting Word32 to Word8
-------------------------------------+-------------------------------------
        Reporter:  svenk             |                   Owner:
            Type:  bug               |                  Status:  closed
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.10.1
      Resolution:  invalid           |                Keywords:
Operating System:  Linux             |            Architecture:  x86_64
 Type of failure:  Incorrect result  |  (amd64)
  at runtime                         |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+-------------------------------------
Changes (by ezyang):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 GHC gives no guarantees for this case: http://hackage.haskell.org/package
 /ghc-prim-0.3.1.0/docs/GHC-Prim.html#v:unsafeCoerce-35- since Word32 and
 Word8 are boxed types.

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


More information about the ghc-tickets mailing list