<div><font face="arial, sans-serif">Someone was trying out my example plugin <</font><a href="https://github.com/chisophugis/clang_plugin_example">https://github.com/chisophugis/clang_plugin_example</a>> <font face="arial, sans-serif">and kept running into a weird assertion failure when running clang with the plugin, but when running just clang the assertion was not triggered. The problem occurred in `include/c++/4.2.1/limits:986`, but h</font><span style="font-family:arial,sans-serif">e was able to reduce it to the following testcase:</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">limit_test.cpp <<EOF</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">#include "limit_test.hpp"</span><br style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">int main() {}</span><br style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
EOF</div><div><br style="background-color:rgb(255,255,255)"><span style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">limit_test.hpp <<EOF</span><br style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">float min() { return __FLT_MIN__; }</span> <br></div><div>EOF</div><div><br></div><div>Here is a paste of the stack dump <a href="http://pastie.org/3587034">http://pastie.org/3587034</a></div>
<div><br></div><div>It seems like the constant __FLT_MIN__ (i.e. `1.17549435e-38F`) is to blame, somehow causing the `semantics` of the APFloat to get an impossible value. He's using a recent trunk (<span style="background-color:rgb(255,255,255);font-family:arial,sans-serif;font-size:13px">r151926).</span></div>
<div><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif;font-size:13px">Does this sound familiar to anyone? Any suggestions? I can't seem to repro this on my computer.</span></div>
<div><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif;font-size:13px">--Sean Silva</span></div>
<div><br></div>