<div dir="ltr"><p style="margin:0px"><font face="arial, helvetica, sans-serif">The following module causes an internal error in beam_except when trying to compile it:</font></p><p style="margin:0px"><font face="arial, helvetica, sans-serif"><br>
</font></p><p style="margin:0px;font-family:Monaco"> -module(compiler_bug).</p><p style="margin:0px">
</p><p style="margin:0px;font-family:Monaco"> f(X) -> a = {X + 1}.</p><div><br></div><p style="margin:0px"><font face="arial, helvetica, sans-serif">Both R15 and R16 exhibits the problem. Here's the error:</font></p>
<p style="margin:0px;font-family:Monaco"><br></p><p style="margin:0px;font-family:Monaco">compiler_bug.erl: internal error in beam_except;</p>
<p style="margin:0px;font-family:Monaco">crash reason: {{case_clause,</p>
<p style="margin:0px;font-family:Monaco"> {'EXIT',</p>
<p style="margin:0px;font-family:Monaco"> {{badmatch,</p>
<p style="margin:0px;font-family:Monaco"> [{set,[],[],</p>
<p style="margin:0px;font-family:Monaco"> {line,[{location,"compiler_bug.erl",3}]}},</p>
<p style="margin:0px;font-family:Monaco"> {set,</p>
<p style="margin:0px;font-family:Monaco"> [{x,0}],</p>
<p style="margin:0px;font-family:Monaco"> [{x,0},{integer,1}],</p>
<p style="margin:0px;font-family:Monaco"> {alloc,1,{gc_bif,'+',{f,0}}}},</p>
<p style="margin:0px;font-family:Monaco"> {set,[],[],{alloc,1,{nozero,nostack,5,[]}}},</p>
<p style="margin:0px;font-family:Monaco"> {set,[{x,1}],[],{put_tuple,1}},</p>
<p style="margin:0px;font-family:Monaco"> {set,[],[{x,0}],put}]},</p>
<p style="margin:0px;font-family:Monaco"> [{beam_except,fix_block,2,</p>
<p style="margin:0px;font-family:Monaco"> [{file,"beam_except.erl"},{line,135}]},</p>
<p style="margin:0px;font-family:Monaco"> {beam_except,translate_exception,4,</p>
<p style="margin:0px;font-family:Monaco"> [{file,"beam_except.erl"},{line,125}]},</p>
<p style="margin:0px;font-family:Monaco"> {beam_except,dig_out,2,</p>
<p style="margin:0px;font-family:Monaco"> [{file,"beam_except.erl"},{line,95}]},</p>
<p style="margin:0px;font-family:Monaco"> {beam_except,translate_1,5,</p>
<p style="margin:0px;font-family:Monaco"> [{file,"beam_except.erl"},{line,75}]},</p>
<p style="margin:0px;font-family:Monaco"> {beam_except,function,1,</p>
<p style="margin:0px;font-family:Monaco"> [{file,"beam_except.erl"},{line,41}]},</p>
<p style="margin:0px;font-family:Monaco"> {beam_except,'-module/2-lc$^0/1-0-',1,</p>
<p style="margin:0px;font-family:Monaco"> [{file,"beam_except.erl"},{line,36}]},</p>
<p style="margin:0px;font-family:Monaco"> {beam_except,module,2,</p>
<p style="margin:0px;font-family:Monaco"> [{file,"beam_except.erl"},{line,36}]},</p>
<p style="margin:0px;font-family:Monaco"> {compile,'-select_passes/2-anonymous-2-',2,</p>
<p style="margin:0px;font-family:Monaco"> [{file,"compile.erl"},{line,477}]}]}}},</p>
<p style="margin:0px;font-family:Monaco"> [{compile,'-select_passes/2-anonymous-2-',2,</p>
<p style="margin:0px;font-family:Monaco"> [{file,"compile.erl"},{line,477}]},</p>
<p style="margin:0px;font-family:Monaco"> {compile,'-internal_comp/4-anonymous-1-',2,</p>
<p style="margin:0px;font-family:Monaco"> [{file,"compile.erl"},{line,277}]},</p>
<p style="margin:0px;font-family:Monaco"> {compile,fold_comp,3,[{file,"compile.erl"},{line,295}]},</p>
<p style="margin:0px;font-family:Monaco"> {compile,internal_comp,4,[{file,"compile.erl"},{line,279}]},</p>
<p style="margin:0px;font-family:Monaco"> {compile,'-do_compile/2-anonymous-0-',2,</p>
<p style="margin:0px;font-family:Monaco"> [{file,"compile.erl"},{line,153}]}]}</p><div><br></div><div>/ Ulf</div></div>