[commit: ghc] master: A further fix for -split-objs with the new codegen (ccf44d8)

Simon Marlow <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/ccf44d89c23b27cb7e185bf229b2265edb590daf

>---------------------------------------------------------------

commit ccf44d89c23b27cb7e185bf229b2265edb590daf
Author: Simon Marlow <[email protected]>
Date:   Wed Sep 5 09:23:04 2012 +0100

    A further fix for -split-objs with the new codegen

>---------------------------------------------------------------

 compiler/codeGen/StgCmmExpr.hs |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/compiler/codeGen/StgCmmExpr.hs b/compiler/codeGen/StgCmmExpr.hs
index ab6f888..bc29c68 100644
--- a/compiler/codeGen/StgCmmExpr.hs
+++ b/compiler/codeGen/StgCmmExpr.hs
@@ -611,7 +611,10 @@ cgIdApp fun_id args
   = do  { fun_info <- getCgIdInfo fun_id
         ; case maybeLetNoEscape fun_info of
             Just (blk_id, lne_regs) -> cgLneJump blk_id lne_regs args
-            Nothing -> cgTailCall fun_id fun_info args }
+            Nothing -> cgTailCall (cg_id fun_info) fun_info args }
+            -- NB. use (cg_id fun_info) instead of fun_id, because the former
+            -- may be externalised for -split-objs.
+            -- See StgCmm.maybeExternaliseId.
 
 cgLneJump :: BlockId -> [LocalReg] -> [StgArg] -> FCode ReturnKind
 cgLneJump blk_id lne_regs args  -- Join point; discard sequel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.