<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>
<div>
<div>Dear Community,</div>
</div>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div><br>
</div>
<div>The <a href="https://github.com/CausalityLtd/ponyc/tree/llvm37">ponyc</a> (llvm37 branch) project is facing an issue on Windows:</div>
<div><br>
</div>
<div>When optimizations are turned on (llvm 3.7.0-final and <a href="https://github.com/CausalityLtd/ponyc/blob/llvm37/src/libponyc/codegen/genopt.cc">more specifically</a>, opt-level 3,  BBVectorize, LoopVectorize, SLPVectorize, RerollLoops, LoadCombine +
 a custom heap to stack pass) writing an object file aborts (on Windows only) with the following fatal error:</div>
<div><br>
</div>
<div>“Starting a function before ending the previous one!” at MCStreamer.cpp:407 during LLVMTargetMachineEmitToFile. Verifying the IR with llc raises no errors.</div>
<div><br>
</div>
<div>What exact problem is being detected here and how can we get more details on the location in the IR that is causing the problem?</div>
<div><br>
</div>
<div>Turning off optimizations successfully writes the object file. This only occurs on Windows, writing object files works fine on Linux and OS X.</div>
<div><br>
</div>
<div>Is this a know issue with LLVM 3.7.0-final and how can this be fixed? Is a patch required?</div>
<div><br>
</div>
<div>This might be related to <a href="https://llvm.org/bugs/show_bug.cgi?id=24374">https://llvm.org/bugs/show_bug.cgi?id=24374</a>.</div>
<div><br>
</div>
<div>Kind regards</div>
<div>Sebastian</div>
<div>
<div id="">
<div>
<div id="the_sig_to_copy">
<div style="max-width:600px; direction: ltr" class="main_html">
<div class="html wisestamp_app main_sig" id="tp1" style="max-width: 470px;margin: 8px 8px 0 0;">
<br>
</div>
</div>
<img src="http://ws-stats.appspot.com/t/pixel.png?e=setup_page_outlook_compose" height="1" width="1"><img src="http://ws-stats.appspot.com/t/pixel.png?e=setup_page_outlook_active&uid=4e244105ed85beb698bdf15e022cc6fa" height="1" width="1"></div>
</div>
<br>
</div>
</div>
</div>
</span>
</body>
</html>