[GHC] #14779: Compiling with -g fails -lint-core checks

GHC ghc-devs at haskell.org
Thu Feb 8 16:30:56 UTC 2018


#14779: Compiling with -g fails -lint-core checks
-------------------------------------+-------------------------------------
        Reporter:  niteria           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:
  (Debugging)                        |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #14122, #14123,   |  Differential Rev(s):
  #8472, #14406                      |
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by niteria):

 {{{
 diff --git a/compiler/simplCore/SimplUtils.hs
 b/compiler/simplCore/SimplUtils.hs
 index d86adbb..c06f03c 100644
 --- a/compiler/simplCore/SimplUtils.hs
 +++ b/compiler/simplCore/SimplUtils.hs
 @@ -1115,6 +1115,7 @@ preInlineUnconditionally env top_lvl bndr rhs
 rhs_env
    | isCoVar bndr                             = Nothing -- Note [Do not
 inline CoVars unconditionally]
    | isExitJoinId bndr                        = Nothing
    | not (one_occ (idOccInfo bndr))           = Nothing
 +  | exprIsLiteralString rhs                  = Nothing
    | not (isStableUnfolding unf)              = Just (extend_subst_with
 rhs)

    -- Note [Stable unfoldings and preInlineUnconditionally]
 }}}

 Fixes it for me and seems desirable. I need to gather some more context to
 be able to intelligently argue for/against it.

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


More information about the ghc-tickets mailing list