Ticket #5747 (closed bug: fixed)

Opened 17 months ago

Last modified 17 months ago

Floating point error with -msse2

Reported by: augustss Owned by: simonmar
Priority: highest Milestone: 7.4.1
Component: Compiler (NCG) Version: 7.2.1
Keywords: Cc: shelarcy@…
Operating System: Unknown/Multiple Architecture: x86
Type of failure: Incorrect result at runtime Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Compile and run this program:

main = print (cos 0)

And you get

$ ghc -O2 -fforce-recomp -msse2 Main.hs
[1 of 1] Compiling Main             ( Main.hs, Main.o )
Linking Main.exe ...
$ ./Main
5.249681779125557e-308

(This is a bug in ghc 7.2.2, but that 7.2.2 is not one of the available version choices.)

Change History

Changed 17 months ago by shelarcy

  • cc shelarcy@… added

Changed 17 months ago by simonmar

  • component changed from Compiler to Compiler (NCG)
  • priority changed from normal to highest
  • difficulty set to Unknown
  • milestone set to 7.4.1
  • owner set to simonmar
  • os changed from Windows to Unknown/Multiple

I have a fix for this in my validate queue.

Changed 17 months ago by marlowsd@…

commit 23a0ded304d9e2089e5f667fd08ae9436e741030

Author: Simon Marlow <marlowsd@gmail.com>
Date:   Thu Jan 5 14:01:58 2012 +0000

    We must emit DELTA pseudo-instructions when moving %esp (#5747)

 compiler/nativeGen/X86/CodeGen.hs |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

Changed 17 months ago by simonmar

  • status changed from new to merge

Changed 17 months ago by igloo

  • status changed from merge to closed
  • resolution set to fixed

Merged as 67513012189fb96ac83096afd0e3b09fa30c4d99

Note: See TracTickets for help on using tickets.