
#15696: Derived Ord instance for enumerations with more than 8 elements seems to be
incorrect
-------------------------------------+-------------------------------------
Reporter: mrkkrp | Owner: osa1
Type: bug | Status: patch
Priority: highest | Milestone: 8.6.2
Component: Compiler | Version: 8.6.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect result | Unknown/Multiple
at runtime | Test Case:
Blocked By: | Blocking:
Related Tickets: #14677, #15155 | Differential Rev(s): Phab:D5196,
Wiki Page: | Phab:D5201
-------------------------------------+-------------------------------------
Comment (by osa1):
OK, that makes sense, thanks. Moving on, I'm now trying to understand an
assertion in `FloatIn` which is triggered when I make the `can_fail`
change and
update `ok_app` so that `dataToTag#` is never OK for speculation.
The assertion that fails is this: (in FloatIn.hs)
{{{
fiExpr _ to_drop (_, AnnLit lit) = ASSERT( null to_drop ) Lit lit
}}}
The definition that triggers it:
{{{
$wclosureTypeHeaderSize_s75y [InlPrag=NOUSERINLINE[2]]
:: ClosureType -> Int#
[LclId, Arity=1, Str=]
$wclosureTypeHeaderSize_s75y
= \ (w_s75u :: ClosureType) ->
case dataToTag# @ ClosureType w_s75u of a#_a4k2 [Dmd=]
{ __DEFAULT ->
join {
$j_s6vr [Dmd=] { __DEFAULT ->
case <# 20# a#_a4k2 of lwild_s6vu {
__DEFAULT -> 2#;
1# -> jump $j_s6vr
}
};
1# -> jump $j_s6vr
}
}
}}}
At one point `fiExpr` comes across this expression:
{{{
case a#_a4k2 :: Int# of a#_X4Mq [Dmd=