[project @ 2003-06-30 14:27:51 by simonpj]
authorsimonpj <unknown>
Mon, 30 Jun 2003 14:27:52 +0000 (14:27 +0000)
committersimonpj <unknown>
Mon, 30 Jun 2003 14:27:52 +0000 (14:27 +0000)
commit1cfc9faaa059b9b090971399e4eb8ae9d364335c
tree50dc9dcadf5ccb0a8733f2eed09cd9531c4afa44
parent064db46a9881e66a760ab7cf34a819ce8ad0878d
[project @ 2003-06-30 14:27:51 by simonpj]
-------------------
Fix a subtle GC bug
-------------------

In GHC 6.0, the top-level definition

f = g

gets compiled as a *non-updatable* THUNK_STATIC closure.  Being non-updatable,
it gets only 1 payload field.  Alas, the static-link field for a THUNK_STATIC
goes in the 3rd payload field.  Disaster.

Solution: make such things updatable. This is probably good because it turns
f into an IND_STATIC, which gets shorted out.  (Even better would be to allocate
an IND_STATIC in the first place.)
ghc/compiler/coreSyn/CoreUtils.lhs
ghc/compiler/stgSyn/CoreToStg.lhs