R10B-6 compiler bug

Bjorn Gustavsson bjorn@REDACTED
Wed Aug 3 12:28:45 CEST 2005


Thanks! Corrected! (The correction will be included in R10B-7.)

/Björn

Sean Hinde <sean.hinde@REDACTED> writes:

> 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
> 

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list