R13B01: internal error in the boolean guard optimizer

Tuncer Ayaz tuncer.ayaz@REDACTED
Tue Aug 18 02:27:10 CEST 2009


Is the following a known problem in R13B01?

The fun is taken from "Erlang Programming".

guard(X,Y) when not(((X>Y) or not(is_atom(X)) ) and (is_atom(Y) or (X==3.4))) ->
  X+Y.

Compiling this with erlc results in an internal compiler error which seems
to happen in the beam assembler's boolean guard optimizer pass.

Function: guard/2
./chapter3.erl:none: internal error in beam_bool;
crash reason: {{case_clause,
                   {'EXIT',
                       {function_clause,
                           [{beam_bool,bopt_cg_not,
                                [{'not',{test,is_atom,fail,[{x,0}]}}]},
                            {beam_bool,'-bopt_cg_not/1-lc$^1/1-0-',1},
                            {beam_bool,'-bopt_cg_not/1-lc$^1/1-0-',1},
                            {beam_bool,bopt_cg_not,1},
                            {beam_bool,'-bopt_cg_not/1-lc$^0/1-1-',1},
                            {beam_bool,bopt_cg_not,1},
                            {beam_bool,bopt_cg,5},
                            {beam_bool,bopt_block,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}]}


More information about the erlang-bugs mailing list