<div dir="ltr">Done.<div><br></div><div><a href="https://llvm.org/bugs/show_bug.cgi?id=24847">https://llvm.org/bugs/show_bug.cgi?id=24847</a><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 16, 2015 at 6:26 PM, Reid Kleckner <span dir="ltr"><<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">That's pretty neat. Can you file a bug and attach a compressed version of a.ll? It looks like link.exe has interesting ordering constraints around associative COMDATs that we haven't run into before.</div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Wed, Sep 16, 2015 at 9:15 AM, Russell Wallace via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div>When I use clang on Windows to compile a program using regular expressions to intermediate code, then run the result through llvm-link and finally try to generate an executable, I get an error.</div><div><br></div><div>All of these ingredients are necessary; it works if the program doesn't use regular expressions, and it works if I compile it directly instead of going via intermediate code. </div><div><br></div><div>The use of the exact llvm-link binary, however, is not a necessary ingredient; I get the same result with a linking program of my own that uses the same libraries as llvm-link.</div><div><br></div><div>Minimal test case:</div><div><br></div><div><div>C:\test>type test.cpp</div><div>#include <regex></div><div><br></div><div>int main() {</div><div>  std::cmatch m;</div><div>  regex_match("a", m, std::regex("a"));</div><div>  return 0;</div><div>}</div><div><br></div><div>C:\test>clang-cl -Xclang -emit-llvm -c -fms-compatibility-version=19 test.cpp</div><div><br></div><div>C:\test>move test.obj test.ll</div><div>Overwrite C:\test\test.ll? (Yes/No/All): y</div><div>        1 file(s) moved.</div><div><br></div><div>C:\test>llvm-link test.ll -o=a.ll</div><div><br></div><div>C:\test>clang-cl -Wno-override-module a.ll</div><div>a-e22d14.obj : fatal error LNK1243: invalid or corrupt file: COMDAT section 0x373 associated with following section 0x389</div><div>clang-cl.exe: error: linker command failed with exit code 1243 (use -v to see invocation)</div><div><br></div><div>C:\test>llvm-link -version</div><div>LLVM (<a href="http://llvm.org/" target="_blank">http://llvm.org/</a>):</div><div>  LLVM version 3.7.0</div><div>  DEBUG build.</div><div>  Default target: x86_64-pc-windows-msvc</div><div>  Host CPU: sandybridge</div></div><div><br></div></div>
<br></div></div>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>