summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2023-05-15 17:37:38 -0400
committerBen Gamari <ben@smart-cactus.org>2023-05-15 17:37:38 -0400
commit204c825fdc937c99371c330c6d56d2cf69fa7e42 (patch)
tree073bfccfe49d2d14e8fa342b61d627bce6b15d23
parent30c45ecfbf480cb300a07a23fafabe2cf466428d (diff)
downloadhaskell-wip/T23210.tar.gz
StgToByteCode: Fix handling of Addr# literalswip/T23210
Previously we assumed that all unlifted types were Addr#.
-rw-r--r--compiler/GHC/StgToByteCode.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/GHC/StgToByteCode.hs b/compiler/GHC/StgToByteCode.hs
index f69c64b5d5..e7cc79f19e 100644
--- a/compiler/GHC/StgToByteCode.hs
+++ b/compiler/GHC/StgToByteCode.hs
@@ -1824,8 +1824,7 @@ pushAtom d p (StgVarArg var)
return (unitOL (PACK con 0), szb)
-- see Note [Generating code for top-level string literal bindings]
- _ | isUnliftedType (idType var) -> do
- massert (idType var `eqType` addrPrimTy)
+ _ | idType var `eqType` addrPrimTy ->
return (unitOL (PUSH_ADDR (getName var)), szb)
| otherwise -> do