[erlang-bugs] bug (HiPE)

Sebastian Egner sebastian.egner@REDACTED
Mon Feb 25 13:48:54 CET 2013


Hello,

Consider the following module:

---- a.erl ----
-module(a).
-export([foo/1]).

foo(X) when is_number(X) ->
    is_integer(X).
----

Then a:foo(0) evaluates to 'false' when compiled with HiPE:

1> c(a).
2> a:foo(0).
true 
3> hipe:c(a, []).           
4> a:foo(0).
false      % *** WRONG ***

The bug seems to be related to HiPE's icode type analysis:

5> hipe:c(a, [no_icode_type]).
6> a:foo(0).                  
true

For what it is worth, we have reproduced the problem on R14B04, R15B02, R15B03,
R16A and OTP_R16A_RELEASE_CANDIDATE-434-gc8651ed on Debian GNU/Linux
and for MacOSX (10.8.2).

Kind regards,

Sebastian Egner and Johannes Weißl




More information about the erlang-bugs mailing list