[GHC] #11290: T6031: *** Core Lint errors : in result of Common sub-expression ***

GHC ghc-devs at haskell.org
Thu Dec 31 00:33:07 UTC 2015


#11290: T6031: *** Core Lint errors : in result of Common sub-expression ***
-------------------------------------+-------------------------------------
        Reporter:  thomie            |                Owner:
            Type:  bug               |               Status:  new
        Priority:  highest           |            Milestone:  8.0.1
       Component:  Compiler          |              Version:  7.11
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
                                     |  deriving/should_compile/T6031,
                                     |  deriving/should_run/T7931 (WAY=hpc)
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 Ah.  The trouble is that the previous float-out pass transforms
 {{{
 f = ...(case $cshowsPrec_aQi of { })...

 x{str=bot} = case $cshowsPrec_aQi of { }
 }}}
 into
 {{{
 lvl = case $cshowsPrec_aQi of { }
 f = ...(case $cshowsPrec_aQi of { })...

 x{str=bot} = case $cshowsPrec_aQi of { }
 }}}
 But 'lvl' doesn't have a strictness annotation.  Now CSE gets rid of `x`
 in favour of `lvl`.  And then Lint complains when it finds a previously
 legitimate `(case x of {})`.

 I have a fix coming, that will deal with this case nicely.  It just
 involves broadening the cases handled by `Note [Bottoming floats]` in
 `SetLevels`.

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


More information about the ghc-tickets mailing list