<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 --- - Compiler crash (segmentation fault) when compiling hand-written LLVM IR code"
   href="https://llvm.org/bugs/show_bug.cgi?id=25274">25274</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Compiler crash (segmentation fault) when compiling hand-written LLVM IR code
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </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>LLVM Codegen
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>sznurek@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=15133" name="attach_15133" title="compiler crashes when compiling this code">attachment 15133</a> <a href="attachment.cgi?id=15133&action=edit" title="compiler crashes when compiling this code">[details]</a></span>
compiler crashes when compiling this code

When compiling attached file (clang -c sort-opt.ll) I had got following error:

0  libLLVM.so.3.7  0x00007f9b06043228
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 56
1  libLLVM.so.3.7  0x00007f9b06042041
2  libpthread.so.0 0x00007f9b058d4d60
3  libLLVM.so.3.7  0x00007f9b0642c8e8
llvm::FastISel::handlePHINodesInSuccessorBlocks(llvm::BasicBlock const*) + 664
4  libLLVM.so.3.7  0x00007f9b0642ccc7
llvm::FastISel::selectInstruction(llvm::Instruction const*) + 55
5  libLLVM.so.3.7  0x00007f9b0653e13c
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 444
6  libLLVM.so.3.7  0x00007f9b0653fa21
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 961
7  libLLVM.so.3.7  0x00007f9b072861c4
8  libLLVM.so.3.7  0x00007f9b0616685f
llvm::FPPassManager::runOnFunction(llvm::Function&) + 639
9  libLLVM.so.3.7  0x00007f9b06166bfb
llvm::FPPassManager::runOnModule(llvm::Module&) + 43
10 libLLVM.so.3.7  0x00007f9b061663e6
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 758
11 clang-3.7       0x0000000000688174
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&,
llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_pwrite_stream*)
+ 2852
12 clang-3.7       0x000000000098418d
13 clang-3.7       0x0000000000908b06 clang::FrontendAction::Execute() + 502
14 clang-3.7       0x00000000008e2e79
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 313
15 clang-3.7       0x0000000000982624
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1940
16 clang-3.7       0x0000000000652958 cc1_main(llvm::ArrayRef<char const*>,
char const*, void*) + 2280
17 clang-3.7       0x000000000064db7b main + 1003
18 libc.so.6       0x00007f9b04fa8610 __libc_start_main + 240
19 clang-3.7       0x0000000000650839 _start + 41
Stack dump:
0.    Program arguments: /usr/bin/clang-3.7 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
-disable-llvm-verifier -main-file-name sort-opt.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 -coverage-file /home/sznurek/Programming/CC/sort-opt.ll
-resource-dir /usr/bin/../lib/clang/3.7.0 -fdebug-compilation-dir
/home/sznurek/Programming/CC -ferror-limit 19 -fmessage-length 168
-mstackrealign -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics
-o sort-opt.o -x ir sort-opt.ll 
1.    Code generation
2.    Running pass 'Function Pass Manager' on module 'sort-opt.ll'.
3.    Running pass 'X86 DAG->DAG Instruction Selection' on function
'@_Z4sortPjS_'
clang-3.7: error: unable to execute command: Segmentation fault (core dumped)
clang-3.7: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.7.0 (tags/RELEASE_370/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang-3.7: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and
associated run script.
clang-3.7: note: diagnostic msg: Error generating preprocessed source(s) - no
preprocessable inputs.</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>