<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 --- - Internal error: getKind() == Template && "Unexpected kind""
   href="http://llvm.org/bugs/show_bug.cgi?id=20458">20458</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Internal error: getKind() == Template && "Unexpected kind"
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.4
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </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>Frontend
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>schnetter@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=12830" name="attach_12830" title="run script">attachment 12830</a> <a href="attachment.cgi?id=12830&action=edit" title="run script">[details]</a></span>
run script

I am using clang 3.4.2 with libstdc++ of gcc 4.9.0 on OS X. When executing this
command:

/Users/eschnett/SIMFACTORY/llvm-3.4.2/install/bin/clang++ -std=c++11 -c -x c++
tree.i

I encounter this internal error:

{{{
Assertion failed: (getKind() == Template && "Unexpected kind"), function
getAsTemplate, file
/Users/eschnett/SIMFACTORY/llvm-3.4.2/src/llvm-3.4.2.src/tools/clang/lib/Sema/../../include/clang/AST/TemplateBase.h,
line 264.
0  libLLVM-3.4.dylib 0x000000010cb1fb62 llvm::sys::PrintStackTrace(__sFILE*) +
34
Stack dump:
0.    Program arguments:
/Users/eschnett/SIMFACTORY/llvm-3.4.2/install/bin/clang -cc1 -triple
x86_64-apple-macosx10.9.0 -emit-obj -mrelax-all -disable-free -main-file-name
tree.i -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -masm-verbose
-munwind-tables -target-cpu core2 -target-linker-version 236.3 -coverage-file
/tmp/cc/mpi-rpc/tree.o -resource-dir
/Users/eschnett/SIMFACTORY/llvm-3.4.2/install/bin/../lib/clang/3.4.2
-stdlib=libc++ -std=c++11 -fdeprecated-macro -fdebug-compilation-dir
/tmp/cc/mpi-rpc -ferror-limit 19 -fmessage-length 80 -stack-protector 1
-mstackrealign -fblocks -fobjc-runtime=macosx-10.9.0
-fencode-extended-block-signature -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-slp -o tree.o -x c++
tree.i 
1.    <eof> parser at end of file
2.    ./cxx_foldable.hh:47:1: instantiating function definition 'foldl'
clang: error: unable to execute command: Illegal instruction: 4
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.4.2 (tags/RELEASE_34/dot2-final)
Target: x86_64-apple-darwin13.3.0
Thread model: posix
clang: 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: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg:
/var/folders/gl/zvl8d6415vsbkd50nnll95k40000gs/T/tree-2dac1a.cpp
clang: note: diagnostic msg:
/var/folders/gl/zvl8d6415vsbkd50nnll95k40000gs/T/tree-2dac1a.sh
clang: note: diagnostic msg: 

********************
}}}

I attach the preprocessed source and the run script.</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>