[erlang-bugs] R13B compiler regression ?
Vincent de Phily
vincent.dephily@REDACTED
Mon Apr 27 20:29:00 CEST 2009
Hi there,
I have the following compiler error :
$ erlc test/aaaa_compileerror.erl
Function -add_clients/1-fun-0-/2 refers to undefined label 9
test/aaaa_compileerror.erl:none: internal error in beam_peep;
crash reason: {{case_clause,{'EXIT',{undefined_label,9}}},
[{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}]}
when compiling this :
-module(aaaa_compileerror).
-export([add_clients/1]).
add_clients(Count) ->
Timeout = 42,
lists:foldl(fun(_, N) ->
%receive after Timeout -> ok end,
case N of
1 -> ok;
%2 -> receive after Timeout -> ok end;
%_ -> Timeout
_ -> receive after Timeout -> ok end
%_ -> ko
end,
N - 1
end, Count, [1,2,3]).
This is narrowed-down code from something that compiles fine in R12B-5.
Playing around with the example, seemingly innocuous changes make the error
disappear.
Pity to find this now, I should have tested R13A :/
--
Vincent de Phily
More information about the erlang-bugs
mailing list