[LLVMbugs] [Bug 17637] New: Assertion failed: TemplateParameterDepth should be greater than the depth of current template being instantiated!
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Oct 21 10:56:13 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=17637
Bug ID: 17637
Summary: Assertion failed: TemplateParameterDepth should be
greater than the depth of current template being
instantiated!
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: rnk at google.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 11400
--> http://llvm.org/bugs/attachment.cgi?id=11400&action=edit
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
http://llvm.org/bugs/ 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.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131021/19c1d820/attachment.html>
More information about the llvm-bugs
mailing list