-fvia-c -O generates mal-typed C code (casts double via unsigned int)

2004-08-07 Thread Duncan Coutts
Hi, Sorry this is a rather complicated bug report but I think I've tracked it down, please bear with me. :-) It involves C code, FFI and optimisations (all seem to be required). Nice. The problem shows up as a double value loosing precision when it is sent to C land and back. It's because ghc

Re: -fvia-c -O generates mal-typed C code (casts double via unsigned int)

2004-08-07 Thread Duncan Coutts
On Sat, 2004-08-07 at 18:52, Duncan Coutts wrote: Attached is a small collection of modules which exhibit the problem. If I make the test case much smaller, the problem goes away. It's not too complicated code though. Some imports were hacked around and a few bits commented out to get it out