[GHC] #12650: Too many warnigns about consistentCafInfo
GHC
ghc-devs at haskell.org
Sat Oct 1 20:57:38 UTC 2016
#12650: Too many warnigns about consistentCafInfo
-------------------------------------+-------------------------------------
Reporter: nomeata | Owner:
Type: task | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
Building GHC with debug on yiedls in many (97!) warnings of the form
{{{
WARNING: file compiler/stgSyn/CoreToStg.hs, line 252
$fFunctorIOEnv True False
}}}
The code in question is
{{{
-- Assertion helper: this checks that the CafInfo on the Id matches
-- what CoreToStg has figured out about the binding's SRT. The
-- CafInfo will be exact in all cases except when CorePrep has
-- floated out a binding, in which case it will be approximate.
consistentCafInfo :: Id -> GenStgBinding Var Id -> Bool
consistentCafInfo id bind
= WARN( not (exact || is_sat_thing) , ppr id <+> ppr id_marked_caffy <+>
ppr binding_is_caffy )
safe
where
safe = id_marked_caffy || not binding_is_caffy
exact = id_marked_caffy == binding_is_caffy
id_marked_caffy = mayHaveCafRefs (idCafInfo id)
binding_is_caffy = topStgBindHasCafRefs bind
is_sat_thing = occNameFS (nameOccName (idName id)) == fsLit "sat"
}}}
It would be nice to have less warnings, to make them more useful. I don’t
know if the warning is not right, or if there is something that can be
fixed about the thing it is warning about.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12650>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list