From b40d1afb89240310b743f1041b9004908f5b24ff Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Tue, 20 Jun 2006 15:05:20 +0000 Subject: [PATCH] flattenCgStmts: fix a case of empty code blocks being generated --- compiler/codeGen/CgMonad.lhs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/codeGen/CgMonad.lhs b/compiler/codeGen/CgMonad.lhs index 4f95c9b..22462e7 100644 --- a/compiler/codeGen/CgMonad.lhs +++ b/compiler/codeGen/CgMonad.lhs @@ -220,7 +220,7 @@ flattenCgStmts id stmts = -- Eliminating these has to be done with a dead-code analysis. For now, -- we just make it into a well-formed block by adding a recursive jump. flatten [CgLabel id] - = ( [], [BasicBlock id [CmmBranch id]] ) + = ( [CmmBranch id], [BasicBlock id [CmmBranch id]] ) -- A jump/branch: throw away all the code up to the next label, because -- it is unreachable. Be careful to keep forks that we find on the way. -- 1.7.10.4