From: Simon Marlow Date: Tue, 20 Jun 2006 15:05:20 +0000 (+0000) Subject: flattenCgStmts: fix a case of empty code blocks being generated X-Git-Tag: Before_FC_branch_merge~357 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=b40d1afb89240310b743f1041b9004908f5b24ff flattenCgStmts: fix a case of empty code blocks being generated --- 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.