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
this:
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).
{ok,hipe_bugs}
2> hipe_bugs:bug2().
<<131>>
3> hipe_bugs:bug2().
<<19>>
4> hipe_bugs:bug2().
<<7>>
5> hipe_bugs:bug2().
<<2>>
6> hipe_bugs:bug2().
<<11>>
7> c(hipe_bugs,[native]).
{ok,hipe_bugs}
8> hipe_bugs:bug2().
<<192>>
9> hipe_bugs:bug2().
<<192>>
10> hipe_bugs:bug2().
<<192>>
11> hipe_bugs:bug2().
<<192>>
<hipe_bugs.erl>
toodlepip,
--david.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hipe_bugs.erl
Type: application/octet-stream
Size: 1006 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20031022/445e0257/attachment.obj>
More information about the erlang-questions
mailing list