<div dir="ltr">On Mon, Jul 29, 2013 at 2:30 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</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"><div class=""><div class="h5">On Mon, Jul 29, 2013 at 2:00 PM, Eli Friedman <span dir="ltr"><<a href="mailto:eli.friedman@gmail.com" target="_blank">eli.friedman@gmail.com</a>></span> wrote:<br>
</div></div><div class="gmail_quote"><div><div class="h5"><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">

<div>On Mon, Jul 29, 2013 at 1:14 PM, Richard Smith<br>
<<a href="mailto:richard-llvm@metafoo.co.uk" target="_blank">richard-llvm@metafoo.co.uk</a>> wrote:<br>
> Author: rsmith<br>
> Date: Mon Jul 29 15:14:16 2013<br>
> New Revision: 187374<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=187374&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=187374&view=rev</a><br>
> Log:<br>
> PR16715: Fix assert in verifier: only mark call to 'operator new' as 'builtin' if<br>
> corresponding 'operator new' was actually emitted as a function marked 'nobuiltin'.<br>
<br>
</div>There's a similar bug involving LTO; consider the following:<br>
<br>
a.cpp:<br>
using size_t = decltype(sizeof(0));<br>
<div>void *operator new(size_t) __attribute__((alias("something")));<br>
<br>
</div>b.cpp:<br>
int *pr16715 = new int;<br>
<br>
If I link these two together with llvm-link, I get exactly the same error.<br>
<br>
Overall, this seems like a very fragile constraint; maybe we can relax<br>
it somehow?</blockquote><div><br></div></div></div><div>It would seem reasonable to me for the verifier to allow the 'builtin' attribute on calls to functions declared without 'nobuiltin'. Patch attached.</div>
</div>
</blockquote></div><br></div><div class="gmail_extra">Ping.<div><br></div><div>-Eli</div></div></div>