Erlang Mailing Lists

Author Message

<  Erlang bugs mailing list  ~  R10B-6 compiler bug

sean.hinde at gmail.com
Posted: Tue Aug 02, 2005 11:16 pm Reply with quote
Guest
Hi,

Just came across this one:

-module(compile_bug).
-export([ test/1]).

-record(a, {a,b,c}).

test(As) ->
case As of
A when A#a.b == ""; A#a.b == undefined ->
true;
_ ->
false
end.

23> c(compile_bug).
Function test/1 refers to undefined label 5
./compile_bug.erl:none: internal error in beam_dead;
crash reason: {{case_clause,{'EXIT',{undefined_label,5}}},
[{compile,'-select_passes/2-anonymous-2-',2},
{compile,'-internal_comp/4-anonymous-1-',2},
{compile,fold_comp,3},
{compile,internal_comp,4},
{compile,internal,3}]}
error

The error seems to occur in pass 'beam_bool' - skipping this pass
avoids creating the error

Another workaround is to use 'or' instead of ';'

Sean


Post generated using Mail2Forum (http://m2f.sourceforge.net)
bjorn at erix.ericsson.se
Posted: Wed Aug 03, 2005 10:37 am Reply with quote
Guest
Thanks! Corrected! (The correction will be included in R10B-7.)

/Bj

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum