[LLVMbugs] [Bug 14174] New: TemplateArgument::getAsTemplate() const: Assertion `Kind == Template && "Unexpected kind"' failed.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Oct 25 01:38:48 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=14174

             Bug #: 14174
           Summary: TemplateArgument::getAsTemplate() const: Assertion
                    `Kind == Template && "Unexpected kind"' failed.
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: mail.sandbox.de at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


------------------
Backtrace:

clang-3.2: /home/xxx/Lib/llvm/tools/clang/include/clang/AST/TemplateBase.h:249:
clang::TemplateName clang::TemplateArgument::getAsTemplate() const: Assertion
`Kind == Template && "Unexpected kind"' failed.
0  clang-3.2       0x000000000183edfe
1  clang-3.2       0x000000000183f2fa
2  libpthread.so.0 0x00007f8c32feccb0
3  libc.so.6       0x00007f8c32442425 gsignal + 53
4  libc.so.6       0x00007f8c32445b8b abort + 379
5  libc.so.6       0x00007f8c3243b0ee
6  libc.so.6       0x00007f8c3243b192
7  clang-3.2       0x0000000002380a94
8  clang-3.2       0x0000000002ccf8b8
clang::TemplateSpecializationTypeLoc::initializeArgLocs(clang::ASTContext&,
unsigned int, clang::TemplateArgument const*, clang::TemplateArgumentLocInfo*,
clang::SourceLocation) + 408
9  clang-3.2       0x0000000002cd24c6
10 clang-3.2       0x0000000002ccd8ae
clang::TypeLoc::initializeImpl(clang::ASTContext&, clang::TypeLoc,
clang::SourceLocation) + 4334
11 clang-3.2       0x00000000025ee890
12 clang-3.2       0x0000000002aed632
clang::ASTContext::getTrivialTypeSourceInfo(clang::QualType,
clang::SourceLocation) const + 98
13 clang-3.2       0x0000000002c73fd2
clang::NestedNameSpecifierLocBuilder::MakeTrivial(clang::ASTContext&,
clang::NestedNameSpecifier*, clang::SourceRange) + 466
14 clang-3.2       0x0000000002ccdfbe
clang::DependentNameTypeLoc::initializeLocal(clang::ASTContext&,
clang::SourceLocation) + 126
15 clang-3.2       0x0000000002ccda49
clang::TypeLoc::initializeImpl(clang::ASTContext&, clang::TypeLoc,
clang::SourceLocation) + 4745
16 clang-3.2       0x00000000025ee890
17 clang-3.2       0x0000000002aed632
clang::ASTContext::getTrivialTypeSourceInfo(clang::QualType,
clang::SourceLocation) const + 98
18 clang-3.2       0x000000000254b32e
19 clang-3.2       0x000000000254b276 clang::Sema::SubstType(clang::QualType,
clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation,
clang::DeclarationName) + 246
20 clang-3.2       0x0000000002498a5c
clang::Sema::CheckTemplateIdType(clang::TemplateName, clang::SourceLocation,
clang::TemplateArgumentListInfo&) + 1244
21 clang-3.2       0x000000000249a533
clang::Sema::ActOnTemplateIdType(clang::CXXScopeSpec&, clang::SourceLocation,
clang::OpaquePtr<clang::TemplateName>, clang::SourceLocation,
clang::SourceLocation, llvm::MutableArrayRef<clang::ParsedTemplateArgument>,
clang::SourceLocation, bool) + 963
22 clang-3.2       0x0000000001cd6cea
clang::Parser::AnnotateTemplateIdTokenAsType() + 394
23 clang-3.2       0x0000000001c6113d
clang::Parser::TryAnnotateTypeOrScopeTokenAfterScopeSpec(bool, bool,
clang::CXXScopeSpec&, bool) + 1341
24 clang-3.2       0x0000000001c61acc
clang::Parser::TryAnnotateTypeOrScopeToken(bool, bool) + 2348
25 clang-3.2       0x0000000001cda26c
clang::Parser::isCXXDeclarationSpecifier(clang::Parser::TPResult, bool*) + 1212
26 clang-3.2       0x0000000001cdc199
clang::Parser::isCXXTypeId(clang::Parser::TentativeCXXTypeIdContext, bool&) +
73
27 clang-3.2       0x0000000001cd82bf
28 clang-3.2       0x0000000001cd6e8a clang::Parser::ParseTemplateArgument() +
58
29 clang-3.2       0x0000000001cd626e
clang::Parser::ParseTemplateArgumentList(llvm::SmallVector<clang::ParsedTemplateArgument,
16u>&) + 46
30 clang-3.2       0x0000000001cd59e5
clang::Parser::ParseTemplateIdAfterTemplateName(clang::OpaquePtr<clang::TemplateName>,
clang::SourceLocation, clang::CXXScopeSpec const&, bool,
clang::SourceLocation&, llvm::SmallVector<clang::ParsedTemplateArgument, 16u>&,
clang::SourceLocation&) + 309
31 clang-3.2       0x0000000001cd65c8
clang::Parser::AnnotateTemplateIdToken(clang::OpaquePtr<clang::TemplateName>,
clang::TemplateNameKind, clang::CXXScopeSpec&, clang::SourceLocation,
clang::UnqualifiedId&, bool) + 424
32 clang-3.2       0x0000000001ca7575
clang::Parser::ParseOptionalCXXScopeSpecifier(clang::CXXScopeSpec&,
clang::OpaquePtr<clang::QualType>, bool, bool*, bool) + 5045
33 clang-3.2       0x0000000001c61a46
clang::Parser::TryAnnotateTypeOrScopeToken(bool, bool) + 2214
34 clang-3.2       0x0000000001cda26c
clang::Parser::isCXXDeclarationSpecifier(clang::Parser::TPResult, bool*) + 1212
35 clang-3.2       0x0000000001cdc199
clang::Parser::isCXXTypeId(clang::Parser::TentativeCXXTypeIdContext, bool&) +
73
36 clang-3.2       0x0000000001c8619a
37 clang-3.2       0x0000000001c9fe99
clang::Parser::ParseParenExpression(clang::Parser::ParenParseOption&, bool,
bool, clang::OpaquePtr<clang::QualType>&, clang::SourceLocation&) + 2297
38 clang-3.2       0x0000000001c9c578 clang::Parser::ParseCastExpression(bool,
bool, bool&, clang::Parser::TypeCastState) + 392
39 clang-3.2       0x0000000001c9a9e3 clang::Parser::ParseCastExpression(bool,
bool, clang::Parser::TypeCastState) + 83
40 clang-3.2       0x0000000001c99848
clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) + 200
41 clang-3.2       0x0000000001c9974f
clang::Parser::ParseExpression(clang::Parser::TypeCastState) + 31
42 clang-3.2       0x0000000001ca0810
clang::Parser::ParseParenExpression(clang::Parser::ParenParseOption&, bool,
bool, clang::OpaquePtr<clang::QualType>&, clang::SourceLocation&) + 4720
43 clang-3.2       0x0000000001c9c578 clang::Parser::ParseCastExpression(bool,
bool, bool&, clang::Parser::TypeCastState) + 392
44 clang-3.2       0x0000000001c9a9e3 clang::Parser::ParseCastExpression(bool,
bool, clang::Parser::TypeCastState) + 83
45 clang-3.2       0x0000000001c99fc3
clang::Parser::ParseRHSOfBinaryExpression(clang::ActionResult<clang::Expr*,
true>, clang::prec::Level) + 1859
46 clang-3.2       0x0000000001c99866
clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) + 230
47 clang-3.2       0x0000000001c9974f
clang::Parser::ParseExpression(clang::Parser::TypeCastState) + 31
48 clang-3.2       0x0000000001cca13c clang::Parser::ParseExprStatement() + 60
49 clang-3.2       0x0000000001cc9846
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&)
+ 2070
50 clang-3.2       0x0000000001cc8f15
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 133
51 clang-3.2       0x0000000001ccfc21
clang::Parser::ParseCompoundStatementBody(bool) + 1521
52 clang-3.2       0x0000000001cd170a
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 282
53 clang-3.2       0x0000000001c5f9e7
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&,
llvm::SmallVector<clang::Parser::LateParsedAttribute*, 2u>*) + 3751
54 clang-3.2       0x0000000001c750be
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 462
55 clang-3.2       0x0000000001c5eb2d
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 1133
56 clang-3.2       0x0000000001c5e303
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 147
57 clang-3.2       0x0000000001c5daa8
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 3384
58 clang-3.2       0x0000000001c5cd32
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 466
59 clang-3.2       0x0000000001c590f6 clang::ParseAST(clang::Sema&, bool, bool)
+ 550
60 clang-3.2       0x0000000001b4a3b8 clang::ASTFrontendAction::ExecuteAction()
+ 312
61 clang-3.2       0x00000000018793a2 clang::CodeGenAction::ExecuteAction() +
1266
62 clang-3.2       0x0000000001b49fcd clang::FrontendAction::Execute() + 237
63 clang-3.2       0x0000000001b1ca88
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 776
64 clang-3.2       0x0000000001843c47
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 999
65 clang-3.2       0x00000000007b30f6 cc1_main(char const**, char const**, char
const*, void*) + 1094
66 clang-3.2       0x00000000007aae19 main + 473
67 libc.so.6       0x00007f8c3242d76d __libc_start_main + 237
68 clang-3.2       0x00000000007aab01
Stack dump:
0.    Program arguments: /usr/local/bin/clang-3.2 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
type_list_test.cpp -mrelocation-model static -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64
-momit-leaf-frame-pointer -resource-dir /usr/local/bin/../lib/clang/3.2 -I
../../include -fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6 -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/x86_64-linux-gnu
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/backward
-internal-isystem /usr/local/include -internal-isystem
/usr/local/bin/../lib/clang/3.2/include -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -O3 -std=c++0x -fdeprecated-macro
-fdebug-compilation-dir /home/xxx/Lib/aura/test/type_list_test -ferror-limit 1
-fmessage-length 230 -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o
/tmp/type_list_test-5Ujcje.o -x c++ type_list_test.cpp 
1.    type_list_test.cpp:189:2 <Spelling=type_list_test.cpp:189:23>: at
annotation token 
2.    type_list_test.cpp:36:1: parsing function body 'main'
3.    type_list_test.cpp:36:1: in compound statement ('{}')
clang-3: error: unable to execute command: Aborted (core dumped)
clang-3: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.2 (trunk 166664)
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: 

-------------
script:

 "/usr/local/bin/clang-3.2" -cc1 -triple x86_64-unknown-linux-gnu -emit-obj
-disable-free -main-file-name type_list_test.cpp -mrelocation-model static
-fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu
x86-64 -momit-leaf-frame-pointer -O3 -std=c++0x -fdeprecated-macro
-ferror-limit 1 -fmessage-length 230 -mstackrealign -fobjc-runtime=gcc
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -x
c++ type_list_test-BftxUW.cpp

-----
Note: Code compiled fine with a clang 3.2 version approximately 2 months ago.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list