<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 --- - compiling this IR causes a segfault - probably has to do with inline assembly"
   href="https://llvm.org/bugs/show_bug.cgi?id=25830">25830</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>compiling this IR causes a segfault - probably has to do with inline assembly
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.7
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Linux
          </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>Common Code Generator Code
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>superjoe30@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=15450" name="attach_15450" title="this IR causes a segfault when compiled with llc">attachment 15450</a> <a href="attachment.cgi?id=15450&action=edit" title="this IR causes a segfault when compiled with llc">[details]</a></span>
this IR causes a segfault when compiled with llc

Compile the attached file with `llc test.ll` and observe a segfault:

warning: ignoring debug info with an invalid version (0) in
/home/andy/tmp/test.ll
#0 0x7f27f82d6ed5 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/nix/store/mc2zwxqfrvschs1vazlg35iw84b71d3q-llvm-3.7.0/bin/../lib/libLLVMSupport.so.3.7+0xbded5)
#1 0x7f27f82d62a1 SignalHandler(int)
(/nix/store/mc2zwxqfrvschs1vazlg35iw84b71d3q-llvm-3.7.0/bin/../lib/libLLVMSupport.so.3.7+0xbd2a1)
#2 0x7f27f747a460 __restore_rt
(/nix/store/hd6km3hscbgl2yw8nx7lr5z9s8h89p04-glibc-2.21/lib/libc.so.6+0x33460)
#3 0x7f27f8682e18
llvm::SelectionDAGBuilder::visitInlineAsm(llvm::ImmutableCallSite)
(/nix/store/mc2zwxqfrvschs1vazlg35iw84b71d3q-llvm-3.7.0/bin/../lib/libLLVMSelectionDAG.so.3.7+0x17ee18)
#4 0x7f27f869247c llvm::SelectionDAGBuilder::visitCall(llvm::CallInst const&)
(/nix/store/mc2zwxqfrvschs1vazlg35iw84b71d3q-llvm-3.7.0/bin/../lib/libLLVMSelectionDAG.so.3.7+0x18e47c)
#5 0x7f27f8694844 llvm::SelectionDAGBuilder::visit(llvm::Instruction const&)
(/nix/store/mc2zwxqfrvschs1vazlg35iw84b71d3q-llvm-3.7.0/bin/../lib/libLLVMSelectionDAG.so.3.7+0x190844)
#6 0x7f27f86a0458
llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::Instruction
const>, llvm::ilist_iterator<llvm::Instruction const>, bool&)
(/nix/store/mc2zwxqfrvschs1vazlg35iw84b71d3q-llvm-3.7.0/bin/../lib/libLLVMSelectionDAG.so.3.7+0x19c458)
#7 0x7f27f86a412a llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function
const&)
(/nix/store/mc2zwxqfrvschs1vazlg35iw84b71d3q-llvm-3.7.0/bin/../lib/libLLVMSelectionDAG.so.3.7+0x1a012a)
#8 0x7f27f86a592d
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(/nix/store/mc2zwxqfrvschs1vazlg35iw84b71d3q-llvm-3.7.0/bin/../lib/libLLVMSelectionDAG.so.3.7+0x1a192d)
#9 0x7f27fbc2c4e4 (anonymous
namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(/nix/store/mc2zwxqfrvschs1vazlg35iw84b71d3q-llvm-3.7.0/bin/../lib/libLLVMX86CodeGen.so.3.7+0x994e4)
#10 0x7f27f94f926f llvm::FPPassManager::runOnFunction(llvm::Function&)
(/nix/store/mc2zwxqfrvschs1vazlg35iw84b71d3q-llvm-3.7.0/bin/../lib/libLLVMCore.so.3.7+0x19826f)
#11 0x7f27f94f9843 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/nix/store/mc2zwxqfrvschs1vazlg35iw84b71d3q-llvm-3.7.0/bin/../lib/libLLVMCore.so.3.7+0x198843)
#12 0x416a7e compileModule(char**, llvm::LLVMContext&)
(/nix/store/mc2zwxqfrvschs1vazlg35iw84b71d3q-llvm-3.7.0/bin/llc+0x416a7e)
#13 0x410778 main
(/nix/store/mc2zwxqfrvschs1vazlg35iw84b71d3q-llvm-3.7.0/bin/llc+0x410778)
#14 0x7f27f7467995 __libc_start_main
(/nix/store/hd6km3hscbgl2yw8nx7lr5z9s8h89p04-glibc-2.21/lib/libc.so.6+0x20995)
#15 0x4107d9 _start
(/nix/store/mc2zwxqfrvschs1vazlg35iw84b71d3q-llvm-3.7.0/bin/llc+0x4107d9)
Stack dump:
0.    Program arguments: llc /home/andy/tmp/test.ll 
1.    Running pass 'Function Pass Manager' on module '/home/andy/tmp/test.ll'.
2.    Running pass 'X86 DAG->DAG Instruction Selection' on function '@main'
Segmentation fault</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>