FloatRep and DoubleRep ADT Argument in STG

Csaba Hruska csaba.hruska at gmail.com
Wed Jan 22 11:56:01 UTC 2020


I try to use GHC backend via STG. For that reason I build small STG program
AST maually. So far the generated programs worked fine (compile/link/run).
However I run into problems when a lifted ADT has a FloatRep argument.
Interestingly it works for DoubleRep.
I'm using GHC 8.6.1 64 bit to generate the code for the constructed STG AST.
I wonder if I break an invariant or is this actually a bug?
Is it valid to use FloatRep argument in a boxed ADT on 64 bit?
I made a gist with the Haskell source and the generated Cmm code is also


Working program (DoubleRep):

Wrong program (FloatRep):

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20200122/8f5ba808/attachment.html>

More information about the ghc-devs mailing list