HIPE bug?

Lon Willett Lon.Willett@REDACTED
Sun Oct 28 18:44:41 CET 2001


Hi all,

I've tried the R8B-0 release with HIPE (--enable-hipe), and ran across
the following problem in one of my tests.  Apparently, when adding two
fixnums overflows into a bignum, hipe compiled code fails to recognize
this.  e.g. when I compile and run:

-module(hipebug).
-export([test/0]).

add(X,Y) ->
    X + Y.

test() ->
    16#7FFFFFF = add(16#7FFFFFF,0),
    16#8000000 = add(16#8000000,0),
    16#8000001 = add(16#8000000,1),
    case add(16#7FFFFFF,1) of
	16#8000000 -> ok;
	-16#7FFFFFF -> error
    end.

with "+native", hipebug:test() return 'error', while without it, it
returns 'ok' (this is on an i386 running redhat 6.2, OTP was built
with gcc 3.0.1).

Is this a known limitation, or a bug in the general implementation, or
just a bug on my system (or in gcc)?

Thanks,

Lon



More information about the erlang-questions mailing list