Opened 2 months ago

Closed 6 weeks ago

#16091 closed bug (fixed)

arith011 broken with integer-simple

Reported by: bgamari Owned by:
Priority: normal Milestone: 8.8.1
Component: Compiler Version: 8.6.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


The arith011 test fails unexpected when using integer-simple.

The test output is quite long but here is the end:

negate 0 = 0
toRational 0 = 0 % 1
toRational 1 = 1 % 1
toRational 2 = 2 % 1
toRational 3 = 3 % 1
Stderr ( arith011 ):
arith011: divide by zero
*** unexpected failure for arith011(normal)

This is concerning since it suggests a behavioral difference between integer-simple and integer-gmp.

Change History (4)

comment:1 Changed 8 weeks ago by Ben Gamari <ben@…>

In 9937820/ghc:

testsuite: Fix a variety of issues when building with integer-simple

 * Mark arith011 as broken with integer-simple

   As noted in #16091, arith011 fails when run against integer-simple with a
   "divide by zero" exception. This suggests that integer-gmp and integer-simple
   are handling division by zero differently.

 * This also fixes broken_without_gmp; the lack of types made the previous
   failure silent, sadly. Improves situation of #16043.

 * Mark several tests implicitly depending upon integer-gmp as broken
   with integer-simple. These expect to see Core coming from integer-gmp,
   which breaks with integer-simple.

 * Increase runtime timeout multiplier of T11627a with integer-simple

   I previously saw that T11627a timed out in all profiling ways when run against
   integer-simple. I suspect this is due to integer-simple's rather verbose heap
   representation. Let's see whether increasing the runtime timeout helps.

   Fixes test for #11627.

This is all in service of fixing #16043.

comment:2 Changed 8 weeks ago by harpocrates

Differential Rev(s):
Status: newpatch

comment:3 Changed 8 weeks ago by Ben Gamari <ben@…>

In bbea9721/ghc:

Division fails fast for `divMod` \w integer-simple

We want to match the behaviour of `Integer` as well as
`Integer`/`Natural` from `integer-gmp`, namely to have

     divMod x 0 = _|_


     divMod x 0 = (_|_, _|_)

See #16091 for an example of where this matters.

comment:4 Changed 6 weeks ago by harpocrates

Resolution: fixed
Status: patchclosed
Note: See TracTickets for help on using tickets.