<div dir="ltr">Thanks for the repros.<div><br></div><div>I think this line may be the problem:</div><div><br></div><div><div style="font-size:12.8px">!30 = distinct !DICompositeType(tag: DW_TAG_union_type, name: "Foo", scope: !30, file: !5, line: 1, size: 32, align: 32, elements: !31)</div><div><br></div><div><br></div><div>The scope is itself. I'll investigate this in the frontend.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 15, 2017 at 9:29 AM, UE US 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><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">It reproduces with trunk on linux here as well. <br><br>...<br>#231 0x0000000004c5f822 llvm::DwarfUnit::<wbr>getOrCreateContextDIE(llvm::<wbr>DIScope const*) /home/jimshinns/llvm-6.0-src/<wbr>lib/CodeGen/AsmPrinter/<wbr>DwarfUnit.cpp:671:0<br>#232 0x0000000004c5faf2 llvm::DwarfUnit::<wbr>getOrCreateTypeDIE(llvm::<wbr>MDNode const*) /home/jimshinns/llvm-6.0-src/<wbr>lib/CodeGen/AsmPrinter/<wbr>DwarfUnit.cpp:714:0<br>#233 0x0000000004c5f822 llvm::DwarfUnit::<wbr>getOrCreateContextDIE(llvm::<wbr>DIScope const*) /home/jimshinns/llvm-6.0-src/<wbr>lib/CodeGen/AsmPrinter/<wbr>DwarfUnit.cpp:671:0<br>#234 0x0000000004c5faf2 llvm::DwarfUnit::<wbr>getOrCreateTypeDIE(llvm::<wbr>MDNode const*) /home/jimshinns/llvm-6.0-src/<wbr>lib/CodeGen/AsmPrinter/<wbr>DwarfUnit.cpp:714:0<br>#235 0x0000000004c5f822 llvm::DwarfUnit::<wbr>getOrCreateContextDIE(llvm::<wbr>DIScope const*) /home/jimshinns/llvm-6.0-src/<wbr>lib/CodeGen/AsmPrinter/<wbr>DwarfUnit.cpp:671:0<br>#236 0x0000000004c5faf2 llvm::DwarfUnit::<wbr>getOrCreateTypeDIE(llvm::<wbr>MDNode const*) /home/jimshinns/llvm-6.0-src/<wbr>lib/CodeGen/AsmPrinter/<wbr>DwarfUnit.cpp:714:0<br>#237 0x0000000004c5f822 llvm::DwarfUnit::<wbr>getOrCreateContextDIE(llvm::<wbr>DIScope const*) /home/jimshinns/llvm-6.0-src/<wbr>lib/CodeGen/AsmPrinter/<wbr>DwarfUnit.cpp:671:0<br>#238 0x0000000004c5faf2 llvm::DwarfUnit::<wbr>getOrCreateTypeDIE(llvm::<wbr>MDNode const*) /home/jimshinns/llvm-6.0-src/<wbr>lib/CodeGen/AsmPrinter/<wbr>DwarfUnit.cpp:714:0<br>#239 0x0000000004c5f822 llvm::DwarfUnit::<wbr>getOrCreateContextDIE(llvm::<wbr>DIScope const*) /home/jimshinns/llvm-6.0-src/<wbr>lib/CodeGen/AsmPrinter/<wbr>DwarfUnit.cpp:671:0<br>#240 0x0000000004c5faf2 llvm::DwarfUnit::<wbr>getOrCreateTypeDIE(llvm::<wbr>MDNode const*) /home/jimshinns/llvm-6.0-src/<wbr>lib/CodeGen/AsmPrinter/<wbr>DwarfUnit.cpp:714:0<br>#241 0x0000000004c5f822 llvm::DwarfUnit::<wbr>getOrCreateContextDIE(llvm::<wbr>DIScope const*) /home/jimshinns/llvm-6.0-src/<wbr>lib/CodeGen/AsmPrinter/<wbr>DwarfUnit.cpp:671:0<br>#242 0x0000000004c5faf2 llvm::DwarfUnit::<wbr>getOrCreateTypeDIE(llvm::<wbr>MDNode const*) /home/jimshinns/llvm-6.0-src/<wbr>lib/CodeGen/AsmPrinter/<wbr>DwarfUnit.cpp:714:0<br>#243 0x0000000004c5f822 llvm::DwarfUnit::<wbr>getOrCreateContextDIE(llvm::<wbr>DIScope const*) /home/jimshinns/llvm-6.0-src/<wbr>lib/CodeGen/AsmPrinter/<wbr>DwarfUnit.cpp:671:0<br>#244 0x0000000004c5faf2 llvm::DwarfUnit::<wbr>getOrCreateTypeDIE(llvm::<wbr>MDNode const*) /home/jimshinns/llvm-6.0-src/<wbr>lib/CodeGen/AsmPrinter/<wbr>DwarfUnit.cpp:714:0<br>#245 0x0000000004c5f822 llvm::DwarfUnit::<wbr>getOrCreateContextDIE(llvm::<wbr>DIScope const*) /home/jimshinns/llvm-6.0-src/<wbr>lib/CodeGen/AsmPrinter/<wbr>DwarfUnit.cpp:671:0<br>#246 0x0000000004c5faf2 llvm::DwarfUnit::<wbr>getOrCreateTypeDIE(llvm::<wbr>MDNode const*) /home/jimshinns/llvm-6.0-src/<wbr>lib/CodeGen/AsmPrinter/<wbr>DwarfUnit.cpp:714:0<br>#247 0x0000000004c5f822 llvm::DwarfUnit::<wbr>getOrCreateContextDIE(llvm::<wbr>DIScope const*) /home/jimshinns/llvm-6.0-src/<wbr>lib/CodeGen/AsmPrinter/<wbr>DwarfUnit.cpp:671:0<br>#248 0x0000000004c5faf2 llvm::DwarfUnit::<wbr>getOrCreateTypeDIE(llvm::<wbr>MDNode const*) /home/jimshinns/llvm-6.0-src/<wbr>lib/CodeGen/AsmPrinter/<wbr>DwarfUnit.cpp:714:0<br>#249 0x0000000004c5f822 llvm::DwarfUnit::<wbr>getOrCreateContextDIE(llvm::<wbr>DIScope const*) /home/jimshinns/llvm-6.0-src/<wbr>lib/CodeGen/AsmPrinter/<wbr>DwarfUnit.cpp:671:0<br>#250 0x0000000004c5faf2 llvm::DwarfUnit::<wbr>getOrCreateTypeDIE(llvm::<wbr>MDNode const*) /home/jimshinns/llvm-6.0-src/<wbr>lib/CodeGen/AsmPrinter/<wbr>DwarfUnit.cpp:714:0<br>#251 0x0000000004c5f822 llvm::DwarfUnit::<wbr>getOrCreateContextDIE(llvm::<wbr>DIScope const*) /home/jimshinns/llvm-6.0-src/<wbr>lib/CodeGen/AsmPrinter/<wbr>DwarfUnit.cpp:671:0<br>#252 0x0000000004c5faf2 llvm::DwarfUnit::<wbr>getOrCreateTypeDIE(llvm::<wbr>MDNode const*) /home/jimshinns/llvm-6.0-src/<wbr>lib/CodeGen/AsmPrinter/<wbr>DwarfUnit.cpp:714:0<br>#253 0x0000000004c5f822 llvm::DwarfUnit::<wbr>getOrCreateContextDIE(llvm::<wbr>DIScope const*) /home/jimshinns/llvm-6.0-src/<wbr>lib/CodeGen/AsmPrinter/<wbr>DwarfUnit.cpp:671:0<br>#254 0x0000000004c5faf2 llvm::DwarfUnit::<wbr>getOrCreateTypeDIE(llvm::<wbr>MDNode const*) /home/jimshinns/llvm-6.0-src/<wbr>lib/CodeGen/AsmPrinter/<wbr>DwarfUnit.cpp:714:0<br>#255 0x0000000004c5f822 llvm::DwarfUnit::<wbr>getOrCreateContextDIE(llvm::<wbr>DIScope const*) /home/jimshinns/llvm-6.0-src/<wbr>lib/CodeGen/AsmPrinter/<wbr>DwarfUnit.cpp:671:0<br>Stack dump:<br>0. Program arguments: /usr/local/bin/clang-6.0 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name test.ll -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb -coverage-notes-file /home/jimshinns/test.gcno -resource-dir /usr/local/lib/clang/6.0.0 -fdebug-compilation-dir /home/jimshinns -ferror-limit 19 -fmessage-length 80 -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -o test.o -x ir test.ll <br>1. Code generation<br>clang-6.0: error: unable to execute command: Segmentation fault (core dumped)<br>clang-6.0: error: clang frontend command failed due to signal (use -v to see invocation)<br>clang version 6.0.0 (trunk 318165)<br>Target: x86_64-unknown-linux-gnu<br>Thread model: posix<br>InstalledDir: /usr/local/bin<br><br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail-m_8414179737728410099gmail_signature">GNOMETOYS<br></div></div><div><div class="gmail-h5">
<br><div class="gmail_quote">On Wed, Nov 15, 2017 at 2:00 AM, Nemanja Ivanovic 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><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Seems like something infinite-recursion like to me:<br><span style="font-family:monospace,monospace">$ clang --version<br>clang version 6.0.0 (trunk 317833)<br>Target: powerpc64le-unknown-linux-gnu<br>$ clang -c test.ll<br>warning: overriding the module target triple with powerpc64le-unknown-linux-gnu [-Woverride-module]<br>...<br>#255 0x0000000012b07a78 llvm::DwarfUnit::getOrCreateTy<wbr>peDIE(llvm::MDNode const*)<br>...<br></span><br></div>So I'd say it reproduces.<br><div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="gmail-m_8414179737728410099h5">On Wed, Nov 15, 2017 at 6:20 AM, 陳韋任 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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-m_8414179737728410099h5"><div dir="ltr"><div style="font-family:arial,helvetica,sans-serif">Test on Mac, with not latest but trunk code. I get error below:</div><div style="font-family:arial,helvetica,sans-serif"><br></div><blockquote style="margin:0px 0px 0px 40px;border-width:medium;border-style:none;border-color:currentcolor;padding:0px"><span style="font-family:arial,helvetica,sans-serif">$ clang -c test.ll<br></span><span style="font-family:arial,helvetica,sans-serif">warning: overriding the module target triple with x86_64-apple-macosx10.13.0 [-Woverride-module]</span><div><font face="arial, helvetica, sans-serif">clang-6.0: error: unable to execute command: Illegal instruction: 4</font></div></blockquote><font face="arial, helvetica, sans-serif"><div><font face="arial, helvetica, sans-serif"><br></font></div><div style="font-family:arial,helvetica,sans-serif;display:inline">I see no infinite recursion here.</div><span class="gmail-m_8414179737728410099m_5177994139836787745gmail-HOEnZb"><font color="#888888"><br></font></span></font><span class="gmail-m_8414179737728410099m_5177994139836787745gmail-HOEnZb"><font color="#888888"><div class="gmail_extra"><div><br></div>-- <br><div class="gmail-m_8414179737728410099m_5177994139836787745gmail-m_8946020698019011855gmail_signature"><div dir="ltr"><div>Wei-Ren Chen (陳韋任)<br>Homepage: <a href="https://people.cs.nctu.edu.tw/%7Echenwj" target="_blank">https://people.cs.nctu.edu.tw/<wbr>~chenwj</a></div></div></div>
</div></font></span></div>
<br></div></div>______________________________<wbr>_________________<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/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div></div></div>
<br>______________________________<wbr>_________________<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/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div></div></div>
<br>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">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/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div></div></div>