[erlang-questions] compiler bug not quite fixed?

Tim Rath rath64@REDACTED
Wed Sep 13 19:34:26 CEST 2006


Hi,

I saw a compiler bug posted to the list by Martin Bjorklund that appeared to be exactly the problem I'm seeing, and then noticed that this was fixed in R11B-1 (as per the release notes.) Unfortunately, though R11B-1 appears to fix the code submitted by Martin, it does not fix my case.

Here's the output (looks the same as in Martin's case):

%erlc a.erl
Function -a/0-fun-0-/1 refers to undefined label 13
./a.erl:none: internal error in beam_clean;
crash reason: {{case_clause,{'EXIT',{undefined_label,13}}},
              [{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}]}
./a.erl:10: Warning: variable 'B' is unused


And here's the smallest amount of code I could come up with that reproduces the problem:

-module(a).
-export([a/0]).

a() ->
 A = {6},
 try
   io:fwrite("")
 after
   fun () ->
     fun () -> {B} = A end
   end
 end.


Edge case?

-Tim



More information about the erlang-questions mailing list