[GHC] #13518: CMM compiles with 8.0.2, fails with git HEAD

GHC ghc-devs at haskell.org
Tue Apr 4 18:52:51 UTC 2017


#13518: CMM compiles with 8.0.2, fails with git HEAD
-------------------------------------+-------------------------------------
        Reporter:  erikd             |                Owner:  (none)
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:  8.4.1
       Component:  Compiler          |              Version:  8.1
      Resolution:  invalid           |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Incorrect         |  Unknown/Multiple
  error/warning at compile-time      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 Cmm lint could still do a better job with the original program, as slyfox
 pointed out.

 * I believe `I32 w` in the formal argument list is meaningless, or
 misleading. I don't think `I32` is a possible type for a function
 argument. (Here it is wrong anyways since on the Haskell side you
 presumably intend to give the function the type `Word# -> Float#`.)

 * `I32[ptr] = f;` should be an error because `f` is a `F32` not `I32`.

 * Returning `I32` seems dubious for the same reason that accepting `I32`
 as an argument does.

 I think Cmm lint ought to catch all of these.

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


More information about the ghc-tickets mailing list