<html>
    <head>
      <base href="http://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 --- - clang crashes when trying to compile a .ll file"
   href="http://llvm.org/bugs/show_bug.cgi?id=15252">15252</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang crashes when trying to compile a .ll file
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </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>-New Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>alistair.low@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>clang crashes if I pass a .ll file as input below. I'm not sure if it's ever
useful to do that, but I noticed the crash and thought it was worth reporting
anyway. The crash should be reproducible with either an empty or non-empty
input file.

$ build/bin/clang test.ll
error: unable to create target: 'No available targets are compatible with this
triple, see -version for the available targets.'
0  clang-3.3       0x0000000001859c52 llvm::sys::PrintStackTrace(_IO_FILE*) +
38
1  clang-3.3       0x0000000001859ed9
2  clang-3.3       0x0000000001859928
3  libpthread.so.0 0x00007fbb2a625cb0
4  clang-3.3       0x0000000001893555
5  clang-3.3       0x00000000018938b3
6  clang-3.3       0x0000000001893b1f
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 136
7  clang-3.3       0x000000000188da88 clang::CodeGenAction::ExecuteAction() +
1382
8  clang-3.3       0x0000000001b0d3c4 clang::FrontendAction::Execute() + 200
9  clang-3.3       0x0000000001ae8608
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 722
10 clang-3.3       0x000000000185ea8c
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1018
11 clang-3.3       0x0000000000c5f603 cc1_main(char const**, char const**, char
const*, void*) + 722
12 clang-3.3       0x0000000000c59167 main + 496
13 libc.so.6       0x00007fbb29a6676d __libc_start_main + 237
14 clang-3.3       0x0000000000c578f9
Stack dump:
0.      Program arguments: /home/alistair/llvm/build/bin/clang-3.3 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name
test.ll -mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64
-momit-leaf-frame-pointer -resource-dir
/home/jenkins/workspace/bc-build-upstream_integration/Configuration/Debug/label/broadcom_linux/build/bin/../lib/clang/3.3
-fdebug-compilation-dir
/home/jenkins/workspace/bc-build-upstream_integration/Configuration/Debug/label/broadcom_linux
-ferror-limit 19 -fmessage-length 237 -mstackrealign -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -backend-option -vectorize-loops
-o /tmp/test-VOuIUQ.o -x ir test.ll
clang-3: error: unable to execute command: Segmentation fault (core dumped)
/usr/bin/ld: cannot find /tmp/test-VOuIUQ.o: No such file or directory
clang-3: error: clang frontend command failed due to signal (use -v to see
invocation)
clang-3: error: linker command failed with exit code 1 (use -v to see
invocation)
clang version 3.3
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang-3: note: diagnostic msg: PLEASE submit a bug report to  and include the
crash backtrace, preprocessed source, and associated run script.
clang-3: 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>