From 4e589b58e1bf3d36b95d48fd45ec76cb84a1b46d Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Fri, 18 Jun 2010 08:21:47 +0000 Subject: [PATCH] joinToTargets: fix a case of panic "handleComponent cyclic" --- compiler/nativeGen/RegAlloc/Linear/JoinToTargets.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- 1.7.10.4