<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW " title="NEW --- - Codegen crash when compiling recent Clang sources using Clang/LLVM release_34" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D24249&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=EpHjbgmvKIaaidH-gCo0CPY40kTAw03HR28gCIyOzfU&s=U7zPrFpFB7dbmCCzMrSIIx3r-skMfOjQPgSV9StDdb4&e=">24249</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Codegen crash when compiling recent Clang sources using Clang/LLVM release_34
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>FreeBSD
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jonathan.robert.anderson@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=14641" name="attach_14641" title="Reduced test case">attachment 14641</a> <a href="attachment.cgi?id=14641&action=edit" title="Reduced test case">[details]</a></span>
Reduced test case

I'm using Clang 3.4.1 (the default system compiler on FreeBSD 10.1) to compile
recent Clang sources. It seems to be choking on one of the MicrosoftCXXABI.cpp
files in the tree, causing a crash in code generation. I've attached a reduced
test case, which also causes a crash in an `llc` that I compiled from the
`release_34` branch.

When I run under GDB (sorry, LLDB support isn't great on FreeBSD 10), I get the
following backtrace:

llvm::SDNode::getOpcode (this=0x0) at SelectionDAGNodes.h:369
369       unsigned getOpcode()  const { return (unsigned short)NodeType; }
(gdb) bt
#0  llvm::SDNode::getOpcode (this=0x0) at SelectionDAGNodes.h:369
#1  0x0000000001245ffe in llvm::SelectionDAGISel::SelectCodeCommon (
    this=0x80e70ed40, NodeToMatch=0x810ee1110, 
    MatcherTable=0x39ccf90 "\026�h\220", TableSize=147443)
    at
/home/jon/LLVM/3.4.1/src/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:2182
#2  0x0000000000d31a04 in (anonymous namespace)::X86DAGToDAGISel::SelectCode (
    this=0x80e70ed40, N=0x810ee1110) at X86GenDAGISel.inc:69739
#3  0x0000000000d2405b in (anonymous namespace)::X86DAGToDAGISel::Select (
    this=0x80e70ed40, Node=0x810ee1110)
    at /home/jon/LLVM/3.4.1/src/lib/Target/X86/X86ISelDAGToDAG.cpp:2772
#4  0x000000000123eac0 in llvm::SelectionDAGISel::DoInstructionSelection (
    this=0x80e70ed40)
    at
/home/jon/LLVM/3.4.1/src/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:845
#5  0x000000000123e125 in llvm::SelectionDAGISel::CodeGenAndEmitDAG (
    this=0x80e70ed40)
    at
/home/jon/LLVM/3.4.1/src/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:746
#6  0x000000000123d2b9 in llvm::SelectionDAGISel::SelectBasicBlock (
    this=0x80e70ed40, Begin=
      {<std::__1::iterator<std::__1::bidirectional_iterator_tag, const
llvm::Instruction, long, const llvm::Instruction *, const llvm::Instruction &>>
= {<No data fields>}, NodePtr = 0x8105392c8}, End=
      {<std::__1::iterator<std::__1::bidirectional_iterator_tag, const
llvm::Instruction, long, const llvm::Instruction *, const llvm::Instruction &>>
= {<No da
ta fields>}, NodePtr = 0x810a25b00}, HadTailCall=@0x7fffffffac9b)
    at
/home/jon/LLVM/3.4.1/src/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:584
#7  0x000000000123d06d in llvm::SelectionDAGISel::SelectAllBasicBlocks (
    this=0x80e70ed40, Fn=@0x8108f5e20)
    at
/home/jon/LLVM/3.4.1/src/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1189
#8  0x000000000123b043 in llvm::SelectionDAGISel::runOnMachineFunction (
    this=0x80e70ed40, mf=@0x806444300)
#9  0x000000000148108e in llvm::MachineFunctionPass::runOnFunction (
    this=0x80e70ed40, F=@0x8108f5e20)
    at /home/jon/LLVM/3.4.1/src/lib/CodeGen/MachineFunctionPass.cpp:33
#10 0x0000000001be44bb in llvm::FPPassManager::runOnFunction (
    this=0x810cc3900, F=@0x8108f5e20)
    at /home/jon/LLVM/3.4.1/src/lib/IR/LegacyPassManager.cpp:1538
#11 0x0000000001be47c8 in llvm::FPPassManager::runOnModule (this=0x810cc3900, 
    M=@0x806430800)
[... etc ...]

The .bc file compiles flawlessly using `llc` from up-to-date LLVM.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>