Another HiPE bug?

David Wallin david.wallin@REDACTED
Wed Oct 22 19:08:38 CEST 2003

Attached the source code, the function 'make_odd/1' should work like 

A binary consisting of an even number of ones is taken as argument. A 
randomly picked bit is flipped and the new binary returned. As shown 
below, this is not the case (the input in this case is 
<<2#00000011>>). I also tried with other inputs and the result was 
always <<192>> when compiled with HiPE.

Eshell V5.3  (abort with ^G)
1> c(hipe_bugs).
2> hipe_bugs:bug2().
3> hipe_bugs:bug2().
4> hipe_bugs:bug2().
5> hipe_bugs:bug2().
6> hipe_bugs:bug2().
7> c(hipe_bugs,[native]).
8> hipe_bugs:bug2().
9> hipe_bugs:bug2().
10> hipe_bugs:bug2().
11> hipe_bugs:bug2().



-------------- next part --------------
A non-text attachment was scrubbed...
Name: hipe_bugs.erl
Type: application/octet-stream
Size: 1006 bytes
Desc: not available
URL: <>

More information about the erlang-questions mailing list