[erlang-bugs] bug (HiPE)

Sebastian Egner <>
Mon Feb 25 13:48:54 CET 2013


Consider the following module:

---- a.erl ----

foo(X) when is_number(X) ->

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

1> c(a).
2> a:foo(0).
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).                  

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