<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 --- - Assertion failed: TemplateParameterDepth should be greater than the depth of current template being instantiated!"
href="http://llvm.org/bugs/show_bug.cgi?id=17637">17637</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Assertion failed: TemplateParameterDepth should be greater than the depth of current template being instantiated!
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</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>rnk@google.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=11400" name="attach_11400" title="tmpl-param-depth.cpp">attachment 11400</a> <a href="attachment.cgi?id=11400&action=edit" title="tmpl-param-depth.cpp">[details]</a></span>
tmpl-param-depth.cpp
I assume this is a bug in delayed template parsing.
Clang's self-diagnostics on the attached file:
$ ./bin/clang-cl -c t.ii -w
clang-3.4: ../tools/clang/lib/Parse/ParseTemplate.cpp:1342: void
clang::Parser::ParseLateTemplatedFuncDef(clang::LateParsedTemplate &):
Assertion `(!FunTmplD || FunTmplD->getTemplateParameters()->getDepth() <
TemplateParameterDepth) && "TemplateParameterDepth should be greater than the
depth of " "current template being instantiated!"' failed.
0 clang-3.4 0x00000000013ab1b5 llvm::sys::PrintStackTrace(_IO_FILE*) +
37
1 clang-3.4 0x00000000013ab603
2 libpthread.so.0 0x00007f615e24acb0
3 libc.so.6 0x00007f615d489425 gsignal + 53
4 libc.so.6 0x00007f615d48cb8b abort + 379
5 libc.so.6 0x00007f615d4820ee
6 libc.so.6 0x00007f615d482192
7 clang-3.4 0x00000000017046be
clang::Parser::ParseLateTemplatedFuncDef(clang::LateParsedTemplate&) + 2062
8 clang-3.4 0x0000000001a4039e
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) + 430
9 clang-3.4 0x0000000001a41d6f
clang::Sema::PerformPendingInstantiations(bool) + 559
10 clang-3.4 0x0000000001a40b9d
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) + 2477
11 clang-3.4 0x0000000001a41d6f
clang::Sema::PerformPendingInstantiations(bool) + 559
12 clang-3.4 0x0000000001a40b9d
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) + 2477
13 clang-3.4 0x0000000001a41d6f
clang::Sema::PerformPendingInstantiations(bool) + 559
14 clang-3.4 0x0000000001a40b9d
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) + 2477
15 clang-3.4 0x0000000001a41d6f
clang::Sema::PerformPendingInstantiations(bool) + 559
16 clang-3.4 0x0000000001a40b9d
clang::Sema::InstantiateFunctionDefinition(clang::SourceLocation,
clang::FunctionDecl*, bool, bool) + 2477
17 clang-3.4 0x0000000001a41d6f
clang::Sema::PerformPendingInstantiations(bool) + 559
18 clang-3.4 0x0000000001723179 clang::Sema::ActOnEndOfTranslationUnit()
+ 441
19 clang-3.4 0x000000000168ba74
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 180
20 clang-3.4 0x0000000001687ec6 clang::ParseAST(clang::Sema&, bool, bool)
+ 470
21 clang-3.4 0x00000000013c7ab2 clang::CodeGenAction::ExecuteAction() +
514
22 clang-3.4 0x00000000015cde30 clang::FrontendAction::Execute() + 112
23 clang-3.4 0x00000000015ac70d
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 925
24 clang-3.4 0x00000000013af2c5
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2853
25 clang-3.4 0x000000000067debf cc1_main(char const**, char const**, char
const*, void*) + 703
26 clang-3.4 0x000000000067c611 main + 8913
27 libc.so.6 0x00007f615d47476d __libc_start_main + 237
28 clang-3.4 0x000000000067a23d
Stack dump:
0. Program arguments:
/usr/local/google/home/rnk/llvm/build_goma/bin/clang-3.4 -cc1 -triple
x86_64-unknown-win32-gnu -emit-obj -mrelax-all -disable-free -main-file-name
t.ii -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -fmath-errno
-masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -D_MT
--dependent-lib=libcmt --dependent-lib=oldnames -cxx-abi microsoft
-fdiagnostics-format msvc -coverage-file
/usr/local/google/home/rnk/llvm/build_goma/t.obj -resource-dir
/usr/local/google/home/rnk/llvm/build_goma/bin/../lib/clang/3.4 -w -std=c++11
-fdeprecated-macro -fdebug-compilation-dir
/usr/local/google/home/rnk/llvm/build_goma -ferror-limit 19 -fmessage-length
317 -mstackrealign -fms-extensions -fms-compatibility -fmsc-version=1700
-fdelayed-template-parsing -fobjc-runtime=gcc -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-slp -o t.obj -x
c++-cpp-output t.ii
1. t.ii:85:23: current parser token '{'
2. t.ii:15:25: instantiating function definition 'operator Action'
3. t.ii:70:25: instantiating function definition 'operator Action'
4. t.ii:60:25: instantiating function definition 'Perform'
5. t.ii:24:38: instantiating function definition 'Perform'
6. t.ii:65:17: instantiating function definition 'gmock_PerformImpl'
clang-3.4: error: unable to execute command: Aborted (core dumped)
clang-3.4: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.4
Target: x86_64-unknown-win32-gnu
Thread model: posix
clang-3.4: 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.4: 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>