unsafeCoerce# between integral and floating point types

John Meacham john at repetae.net
Fri Jul 9 17:18:04 EDT 2010

On Fri, Jul 09, 2010 at 07:14:58AM -1000, Lennart Augustsson wrote:
> That might not work if the alignment constraints differ between the two types.

Easy enough to fix, just compare the alignments and alloca with the
greater of the two. the optimizer should be able to optimize out the

of course, this bug[1] makes it sort of moot in ghc at least. 

[1] http://hackage.haskell.org/trac/ghc/ticket/r2917


John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/

More information about the Glasgow-haskell-users mailing list