[m-rev.] problems with abs for int{8,16,32}

Julien Fischer jfischer at opturion.com
Thu Feb 15 10:03:00 AEDT 2018


On Thu, 15 Feb 2018, Zoltan Somogyi wrote:

> The test cases arith_int{8,16,32} all fail in asm_fast.gc.debug.stseg
> with an error like this:
>
> --- arith_int16.exp	2018-01-15 18:23:15.388984921 +1100
> +++ arith_int16.out	2018-02-15 08:53:39.853500020 +1100
> @@ -28,7 +28,7 @@
>
> *** Test unary operation 'abs' ***
>
> -abs -32768 = <<exception>>
> +abs -32768 = -32768
> abs -128 = 128
> abs 0 = 0
> abs 1 = 1
>
> The arith_int64 test case succeeds,

You were presumably running these on a 64-bit machine?

> and all the tests are fine in asm_fast.gc as well.
>
> I checked, and the abs operation on e.g. min_int8 throws
> an exception, as expected, when invoked directly from main,
> but the exception vanishes when invoked from within a try block.
>
> Julien, I think fixing this is up to you. I am attaching my cut-down
> test case to save you a bit of work.

Thanks, I'll take a look at it.

Julien.


More information about the reviews mailing list