
#15570: Core transformations generate bad indexCharOffAddr# call
-------------------------------------+-------------------------------------
Reporter: alpmestan | Owner: alpmestan
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version: 8.5
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):
This is all very mysterious. What I get from HEAD (for `f`) is this:
{{{
Rec {
-- RHS size: {terms: 33, types: 19, coercions: 0, joins: 0/0}
Bug.$wgo [InlPrag=NOUSERINLINE[2], Occ=LoopBreaker]
:: Int# -> [Char] -> (# Char, [Char] #)
[GblId, Arity=2, Caf=NoCafRefs, Str=m2,
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
Tmpl= \ (n__aXh [Occ=Once] :: Int) ->
Bug.f_go n__aXh (GHC.Types.[] @ Char)}]
f = \ (n__aXh :: Int) ->
case n__aXh of { I# ww1_s2QZ ->
case Bug.$wgo ww1_s2QZ (GHC.Types.[] @ Char) of
{ (# ww3_s2R5, ww4_s2R6 #) ->
GHC.Types.: @ Char ww3_s2R5 ww4_s2R6
}
}
}}}
which looks very plausible.
You are getting something quite different with your Hadrian build. Can
you give precise repro instructions? (Including `build.mk` etc.)
I'm very puzzled about this mysterious case of `GHC.Real.even3`. Where on
earth does that come from? And if it is equal to `-1` why doesn't the
case get eliminated?
--
Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15570#comment:2
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler