flattenCgStmts: fix a case of empty code blocks being generated
authorSimon Marlow <simonmar@microsoft.com>
Tue, 20 Jun 2006 15:05:20 +0000 (15:05 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Tue, 20 Jun 2006 15:05:20 +0000 (15:05 +0000)
compiler/codeGen/CgMonad.lhs

index 4f95c9b..22462e7 100644 (file)
@@ -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.