diff options
author | Ben Gamari <ben@smart-cactus.org> | 2023-05-15 17:37:38 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2023-05-15 17:37:38 -0400 |
commit | 204c825fdc937c99371c330c6d56d2cf69fa7e42 (patch) | |
tree | 073bfccfe49d2d14e8fa342b61d627bce6b15d23 | |
parent | 30c45ecfbf480cb300a07a23fafabe2cf466428d (diff) | |
download | haskell-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.hs | 3 |
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 |