[GHC] #11296: T8726 fails on arm

#11296: T8726 fails on arm -------------------------------------+------------------------------------- Reporter: bgamari | Owner: bgamari Type: bug | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.10.3 Keywords: | Operating System: Linux Architecture: arm | Type of failure: Incorrect result | at runtime Test Case: T8726 | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- {{{ cd ./numeric/should_run && ./T8726 T8726.run.stdout 2> T8726.run.stderr Wrong exit code (expected 0 , actual 1 ) Stdout: Stderr: T8726: user error (divMod0 -2 79228162514264337593543950336) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11296 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11296: T8726 fails on arm -------------------------------------+------------------------------------- Reporter: bgamari | Owner: bgamari Type: bug | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: Linux | Architecture: arm Type of failure: Incorrect result | Test Case: T8726 at runtime | Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): Hmmm... {{{#!hs n,d :: Integer (n,d) = (-2, 79228162514264337593543950337) f :: Integer -> Integer -> Integer f n d = (n `div` d) * d + (n `mod` d) main :: IO () main = let r = f n d in print (n, r, r-n, r==n, r/=n) }}} results in, {{{ $ inplace/bin/ghc-stage2 -O Hello.hs [1 of 1] Compiling Main ( Hello.hs, Hello.o ) Linking Hello ... $ ./Hello (-2,-2,0,False,True) }}} What a world we live in. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11296#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11296: T8726 fails on arm -------------------------------------+------------------------------------- Reporter: bgamari | Owner: bgamari Type: bug | Status: new Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: Linux | Architecture: arm Type of failure: Incorrect result | Test Case: T8726 at runtime | Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by hvr): More trimmed down repro-case: {{{#!hs {-# LANGUAGE MagicHash #-} {-# OPTIONS_GHC -O0 #-} import GHC.Integer.GMP.Internals import GHC.Exts main :: IO () main = do print (x, isValidInteger x) print (y, isValidInteger y) print (z, isValidInteger z) -- reports (-2,False) on 32bit where z = x + y x = 0x0ffffffffffffffffffffffff :: Integer -- 3 limbs y = -0x1000000000000000000000001 :: Integer -- 4 limbs isValidInteger i = isTrue# (isValidInteger# i) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11296#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11296: T8726 fails on arm
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner: bgamari
Type: bug | Status: new
Priority: normal | Milestone: 8.0.1
Component: Compiler | Version: 7.10.3
Resolution: | Keywords:
Operating System: Linux | Architecture: arm
Type of failure: Incorrect result | Test Case: T8726
at runtime |
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by bgamari):
The first bad commit appears to be,
{{{
commit 9e8562ae02701270e2c1dfcee3279d862dc5b7b6
Author: Ben Gamari

#11296: T8726 fails on arm -------------------------------------+------------------------------------- Reporter: bgamari | Owner: bgamari Type: bug | Status: patch Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: Linux | Architecture: arm Type of failure: Incorrect result | Test Case: T8726 at runtime | Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1707 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => patch * differential: => Phab:D1707 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11296#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11296: T8726 fails on arm
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner: bgamari
Type: bug | Status: patch
Priority: normal | Milestone: 8.0.1
Component: Compiler | Version: 7.10.3
Resolution: | Keywords:
Operating System: Linux | Architecture: arm
Type of failure: Incorrect result | Test Case: T8726
at runtime |
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D1707
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#11296: T8726 fails on arm
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner: bgamari
Type: bug | Status: patch
Priority: normal | Milestone: 8.0.1
Component: Compiler | Version: 7.10.3
Resolution: | Keywords:
Operating System: Linux | Architecture: arm
Type of failure: Incorrect result | Test Case: T8726
at runtime |
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D1707
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#11296: T8726 fails on arm -------------------------------------+------------------------------------- Reporter: bgamari | Owner: bgamari Type: bug | Status: closed Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.10.3 Resolution: fixed | Keywords: Operating System: Linux | Architecture: arm Type of failure: Incorrect result | Test Case: T8726 at runtime | Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1707 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11296#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC