<div dir="ltr">On Mon, Nov 18, 2013 at 11:52 AM, Anthony Ramine <span dir="ltr"><<a href="mailto:n.oxyde@gmail.com" target="_blank">n.oxyde@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hello,<br>
<br>
The compiler shouldn't crash when fed an already-optimised BEAM assembly file.<br>
<br>
        git fetch <a href="https://github.com/nox/otp.git" target="_blank">https://github.com/nox/otp.git</a> beam-fp-insts<br>
<br>
        <a href="https://github.com/nox/otp/compare/beam-fp-insts" target="_blank">https://github.com/nox/otp/compare/beam-fp-insts</a><br>
        <a href="https://github.com/nox/otp/compare/beam-fp-insts.patch" target="_blank">https://github.com/nox/otp/compare/beam-fp-insts.patch</a><br>
<br></blockquote><div><br></div><div>I am very picky with good coverage of the compiler code. If coverage</div><div>is good to begin with, it is easy to see when the coverage gets worse</div><div>that some optimization is no longer being applied.</div>
<div><br></div><div>Suggestion: Include the following one-line change in your patch and</div><div>fix the remaining problems:</div><div><br></div><div>diff --git a/lib/compiler/test/compile_SUITE.erl b/lib/compiler/test/compile_SUITE.erl<br>
</div><div><div>index be01ea7..4e2753d 100644</div><div>--- a/lib/compiler/test/compile_SUITE.erl</div><div>+++ b/lib/compiler/test/compile_SUITE.erl</div><div>@@ -794,7 +794,7 @@ do_asm(Beam, Outdir) -></div><div>        {ok,Fd} = file:open(AsmFile, [write]),</div>
<div>        beam_listing:module(Fd, Asm),</div><div>        ok = file:close(Fd),</div><div>-       case compile:file(AsmFile, [from_asm,no_postopt,binary,report]) of</div><div>+       case compile:file(AsmFile, [from_asm,binary,report]) of</div>
<div>            {ok,M,_} -></div><div>                ok = file:delete(AsmFile);</div><div>            Other -></div></div><div><br></div><div>/Bjorn</div></div><div><br></div>-- <br>Björn Gustavsson, Erlang/OTP, Ericsson AB
</div></div>