From: Simon Marlow Date: Fri, 18 Jun 2010 08:21:47 +0000 (+0000) Subject: joinToTargets: fix a case of panic "handleComponent cyclic" X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=4e589b58e1bf3d36b95d48fd45ec76cb84a1b46d;p=ghc-hetmet.git joinToTargets: fix a case of panic "handleComponent cyclic" --- diff --git a/compiler/nativeGen/RegAlloc/Linear/JoinToTargets.hs b/compiler/nativeGen/RegAlloc/Linear/JoinToTargets.hs index 8ff06eb..a9367f9 100644 --- a/compiler/nativeGen/RegAlloc/Linear/JoinToTargets.hs +++ b/compiler/nativeGen/RegAlloc/Linear/JoinToTargets.hs @@ -289,7 +289,8 @@ handleComponent delta _ (AcyclicSCC (vreg, src, dsts)) -- require a fixup. -- handleComponent delta instr - (CyclicSCC ( (vreg, InReg sreg, [InReg dreg]) : rest)) + (CyclicSCC ( (vreg, InReg sreg, (InReg dreg: _)) : rest)) + -- dest list may have more than one element, if the reg is also InMem. = do -- spill the source into its slot (instrSpill, slot)