[GHC] #13390: Strict literal float-out during desugaring regresses T1969 at -O0

GHC ghc-devs at haskell.org
Tue May 9 16:30:07 UTC 2017


#13390: Strict literal float-out during desugaring regresses T1969 at -O0
-------------------------------------+-------------------------------------
        Reporter:  bgamari           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.4.1
       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 simonpj):

 I tried the example in the Description to try to get to the bottom of
 this.  With HEAD and no -O I get
 {{{
 -------------- Class-op selectors for c,d,e ----------
 c :: forall a. C a => a -> String
 [GblId[ClassOp],
  Arity=1,
  Caf=NoCafRefs,
  Str=<S(SLL),U(U,A,A)>,
  RULES: Built in rule for c: "Class op c"]
 c = \ (@ a_aop) (v_B1 :: C a_aop) ->
       case v_B1 of v_B1 { T1969.C:C v_B2 v_B3 v_B4 -> v_B2 }

 -- .....and similarly for 'd', 'e'


 -------------- Default methods for d,e ----------
 T1969.$dmd :: forall a. C a => a -> String
 [GblId, Arity=2, Caf=NoCafRefs]
 T1969.$dmd
   = \ (@ a_aop) ($dC_aT1 :: C a_aop) (x_aoq :: a_aop) ->
       c @ a_aop $dC_aT1 x_aoq

 -- .....and similary for 'e'


 -------------- Dictionary for (C A1) -----------
 $cc_rUv :: A1 -> String
 [GblId, Arity=1]
 $cc_rUv
   = \ (ds_dUq :: A1) ->
       case ds_dUq of { A1 -> GHC.CString.unpackCString# "A1"# }

 T1969.$fCA1 [InlPrag=CONLIKE] :: C A1
 [GblId[DFunId]]
 T1969.$fCA1 = T1969.C:C @ A1 $cc_rUv $cc_rUv $cc_rUv
 }}}
 This looks absolutely fine to me.

 What is the problem we are trying to solve here?  Maybe it's solved
 already?  (In which case can we just make sure that T1969 at `-O0` is a
 regression test?)

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


More information about the ghc-tickets mailing list