[GHC] #8849: Unregisterised compiler: arithmetic failure

#8849: Unregisterised compiler: arithmetic failure --------------------------+------------------------------------------------ Reporter: | Owner: trommler | Status: new Type: bug | Milestone: Priority: normal | Version: 7.8.1-rc2 Component: | Operating System: Unknown/Multiple Compiler | Type of failure: Incorrect result at runtime Keywords: | Test Case: arith005 Architecture: | Blocking: Unknown/Multiple | Difficulty: | Unknown | Blocked By: | Related Tickets: #8819 | --------------------------+------------------------------------------------ Compiling the following with RC2 on powerpc 64 downloaded from haskell.org: {{{ main = putStr $ show (-1.0000000001 :: Double) }}} Setting {{{-O}}} yields: {{{ 0.0 }}} Without optimization the correct result is displayed. I prepared an unregisterised compiler on amd64 and see the same issue and more arithmetic tests fail in testsuite. In fact I took the above from arith005. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8849 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8849: Unregisterised compiler: arithmetic failure ------------------------------------------------+-------------------------- Reporter: trommler | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: Resolution: | 7.8.1-rc2 Operating System: Linux | Keywords: Type of failure: Incorrect result at runtime | Architecture: Test Case: arith005 | Unknown/Multiple Blocking: | Difficulty: | Unknown | Blocked By: | Related Tickets: #8819 ------------------------------------------------+-------------------------- Changes (by trommler): * os: Unknown/Multiple => Linux Comment: I should add I ran the tests on Linux. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8849#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8849: Unregisterised compiler: arithmetic failure ------------------------------------------------+-------------------------- Reporter: trommler | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: Resolution: | 7.8.1-rc2 Operating System: Linux | Keywords: Type of failure: Incorrect result at runtime | Architecture: Test Case: arith005 | Unknown/Multiple Blocking: | Difficulty: | Unknown | Blocked By: | Related Tickets: #8819 ------------------------------------------------+-------------------------- Comment (by trommler): I produced the attached files on my amd64 machine. In line 26 of mini.hc (with {{{-O}}} optimization) we see a constant {{{0.0}}} whereas line 32 in mini-noopt.hc there is {{{1.0000000001}}} and a call to {{{GHC.Num.negate}}}. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8849#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8849: Unregisterised compiler: arithmetic failure ------------------------------------------------+-------------------------- Reporter: trommler | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.3 Component: Compiler | Version: Resolution: | 7.8.1-rc2 Operating System: Linux | Keywords: Type of failure: Incorrect result at runtime | Architecture: Test Case: arith005 | Unknown/Multiple Blocking: 8819 | Difficulty: | Unknown | Blocked By: | Related Tickets: #8819 ------------------------------------------------+-------------------------- Changes (by trommler): * blocking: => 8819 * milestone: => 7.8.3 Comment: As this is a regression from 7.6.3 we should look into this for 7.8.3. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8849#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8849: Unregisterised compiler: arithmetic failure -------------------------------------+------------------------------------- Reporter: trommler | Owner: Type: bug | Status: merge Priority: normal | Milestone: 7.8.4 Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: Operating System: Linux | Architecture: Unknown/Multiple Type of failure: Incorrect | Difficulty: Unknown result at runtime | Blocked By: Test Case: arith005 | Related Tickets: #8819 Blocking: 8819 | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by trommler): * status: new => merge Comment: The following commit fixes the bug: https://phabricator.haskell.org/rGHC43f1b2ecd1960fa7377cf55a2b97c66059a701ef -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8849#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8849: Unregisterised compiler: arithmetic failure -------------------------------------+------------------------------------- Reporter: trommler | Owner: Type: bug | Status: merge Priority: high | Milestone: 7.8.4 Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: Operating System: Linux | Architecture: Unknown/Multiple Type of failure: Incorrect | Difficulty: Easy (less than 1 result at runtime | hour) Test Case: arith005 | Blocked By: Blocking: 8819 | Related Tickets: #8819 Differential Revisions: | -------------------------------------+------------------------------------- Changes (by trommler): * priority: normal => high * difficulty: Unknown => Easy (less than 1 hour) Comment: This ticket blocks #8819 which is priority high. The commit mentioned in comment:5 applied cleanly when I prepared a patch file for the released 7.8.3 tarball. You should be able to just cherry- pick it. If not, please assign the ticket to me and let me know what you prefer: phabricator, patch file? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8849#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8849: Unregisterised compiler: arithmetic failure -------------------------------------+------------------------------------- Reporter: trommler | Owner: Type: bug | Status: closed Priority: high | Milestone: 7.8.4 Component: Compiler | Version: 7.8.1-rc2 Resolution: fixed | Keywords: Operating System: Linux | Architecture: Unknown/Multiple Type of failure: Incorrect | Difficulty: Easy (less than 1 result at runtime | hour) Test Case: arith005 | Blocked By: Blocking: 8819 | Related Tickets: #8819 Differential Revisions: | -------------------------------------+------------------------------------- Changes (by thoughtpolice): * status: merge => closed * resolution: => fixed Comment: These have been merged into `ghc-7.8`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8849#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC