[LLVMbugs] [Bug 15112] New: Assertion failed: isa<LabelDecl>(D) SemaTemplateInstantiate.cpp:2682

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jan 29 11:36:25 PST 2013


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

             Bug #: 15112
           Summary: Assertion failed: isa<LabelDecl>(D)
                    SemaTemplateInstantiate.cpp:2682
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: gasper.azman at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 9941
  --> http://llvm.org/bugs/attachment.cgi?id=9941
Source code that made this crash

Crash report:

In file included from
/home/atomicity/work/neuroblaze/nb/.coords_public_iface.tmp.cpp:22:
/home/atomicity/work/neuroblaze/nb/tests/coords_public_iface.t.hpp:126:70:
error: too many arguments provided to function-like macro invocation
    TS_ASSERT_EQUALS(nb::typeq::memtag_is<decltype(c1), cpu>::value, true);
                                                                     ^
clang:
/home/atomicity/clang-build/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp:2682:
llvm::PointerUnion<clang::Decl*, llvm::SmallVector<clang::Decl*, 4u>*>*
clang::LocalInstantiationScope::findInstantiationOf(const clang::Decl*):
Assertion `isa<LabelDecl>(D) && "declaration not instantiated in this scope"'
failed.
0  clang           0x0000000001fd542f
1  clang           0x0000000001fd5929
2  libpthread.so.0 0x00007f1bb848f1e0
3  libc.so.6       0x00007f1bb76ee2c5 gsignal + 53
4  libc.so.6       0x00007f1bb76ef748 abort + 328
5  libc.so.6       0x00007f1bb76e7312
6  libc.so.6       0x00007f1bb76e73c2
7  clang           0x0000000000d40ca8
clang::LocalInstantiationScope::findInstantiationOf(clang::Decl const*) + 360
8  clang           0x0000000000d6e64b
clang::Sema::FindInstantiatedDecl(clang::SourceLocation, clang::NamedDecl*,
clang::MultiLevelTemplateArgumentList const&) + 75
9  clang           0x0000000000d3f025
10 clang           0x0000000000d3f60b
11 clang           0x0000000000d46865
12 clang           0x0000000000d47582
13 clang           0x0000000000d4b210
14 clang           0x0000000000d4c2d9
15 clang           0x0000000000d557ee
16 clang           0x0000000000d4c73d
17 clang           0x0000000000d4d471
18 clang           0x0000000000d475fe
19 clang           0x0000000000d4b210
20 clang           0x0000000000d53186
21 clang           0x0000000000d536b6
22 clang           0x0000000000d4befe
23 clang           0x0000000000d4d471
24 clang           0x0000000000d4d578
25 clang           0x0000000000d4dfe3 clang::Sema::SubstType(clang::QualType,
clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation,
clang::DeclarationName) + 131
26 clang           0x0000000000d18c38
clang::Sema::SubstituteExplicitTemplateArguments(clang::FunctionTemplateDecl*,
clang::TemplateArgumentListInfo&,
llvm::SmallVectorImpl<clang::DeducedTemplateArgument>&,
llvm::SmallVectorImpl<clang::QualType>&, clang::QualType*,
clang::sema::TemplateDeductionInfo&) + 1240
27 clang           0x0000000000d238a2
clang::Sema::DeduceTemplateArguments(clang::FunctionTemplateDecl*,
clang::TemplateArgumentListInfo*, llvm::ArrayRef<clang::Expr*>,
clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&) + 562
28 clang           0x0000000000ca5db8
clang::Sema::AddTemplateOverloadCandidate(clang::FunctionTemplateDecl*,
clang::DeclAccessPair, clang::TemplateArgumentListInfo*,
llvm::ArrayRef<clang::Expr*>, clang::OverloadCandidateSet&, bool) + 344
29 clang           0x0000000000ca93ac
clang::Sema::AddOverloadedCallCandidates(clang::UnresolvedLookupExpr*,
llvm::ArrayRef<clang::Expr*>, clang::OverloadCandidateSet&, bool) + 604
30 clang           0x0000000000ca9716
clang::Sema::buildOverloadedCallSet(clang::Scope*, clang::Expr*,
clang::UnresolvedLookupExpr*, clang::Expr**, unsigned int,
clang::SourceLocation, clang::OverloadCandidateSet*,
clang::ActionResult<clang::Expr*, true>*) + 294
31 clang           0x0000000000caed56
clang::Sema::BuildOverloadedCallExpr(clang::Scope*, clang::Expr*,
clang::UnresolvedLookupExpr*, clang::SourceLocation, clang::Expr**, unsigned
int, clang::SourceLocation, clang::Expr*, bool) + 150
32 clang           0x0000000000c0f66b clang::Sema::ActOnCallExpr(clang::Scope*,
clang::Expr*, clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>,
clang::SourceLocation, clang::Expr*, bool) + 875
33 clang           0x0000000000a7f230
clang::Parser::ParsePostfixExpressionSuffix(clang::ActionResult<clang::Expr*,
true>) + 4080
34 clang           0x0000000000a7847b clang::Parser::ParseCastExpression(bool,
bool, bool&, clang::Parser::TypeCastState) + 203
35 clang           0x0000000000a7a76d clang::Parser::ParseCastExpression(bool,
bool, clang::Parser::TypeCastState) + 29
36 clang           0x0000000000a788c8 clang::Parser::ParseCastExpression(bool,
bool, bool&, clang::Parser::TypeCastState) + 1304
37 clang           0x0000000000a7a76d clang::Parser::ParseCastExpression(bool,
bool, clang::Parser::TypeCastState) + 29
38 clang           0x0000000000a7bb8f
clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) + 31
39 clang           0x0000000000a57619
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&) + 489
40 clang           0x0000000000a6203e
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 414
41 clang           0x0000000000a66e18
clang::Parser::ParseSimpleDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&,
unsigned int, clang::SourceLocation&,
clang::Parser::ParsedAttributesWithRange&, bool, clang::Parser::ForRangeInit*)
+ 760
42 clang           0x0000000000a66fc3
clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned
int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 147
43 clang           0x0000000000aa82b8
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&)
+ 280
44 clang           0x0000000000aa8a0d
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 141
45 clang           0x0000000000aa6317
clang::Parser::ParseCompoundStatementBody(bool) + 1831
46 clang           0x0000000000aacdbd
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 141
47 clang           0x0000000000abd0df
clang::Parser::ParseLexedMethodDef(clang::Parser::LexedMethod&) + 639
48 clang           0x0000000000abcde0
clang::Parser::ParseLexedMethodDefs(clang::Parser::ParsingClass&) + 160
49 clang           0x0000000000a735d5
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, unsigned int,
clang::Decl*) + 2581
50 clang           0x0000000000a74a55
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext,
clang::Parser::ParsedAttributesWithRange&) + 3525
51 clang           0x0000000000a5d84c
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) + 5244
52 clang           0x0000000000a4c970
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 96
53 clang           0x0000000000a4cec9
54 clang           0x0000000000a4cfbf
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 31
55 clang           0x0000000000a4f4c4
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 116
56 clang           0x0000000000a4fb03
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 195
57 clang           0x0000000000a4af7a clang::ParseAST(clang::Sema&, bool, bool)
+ 266
58 clang           0x0000000000901bce clang::CodeGenAction::ExecuteAction() +
78
59 clang           0x00000000007a0c36 clang::FrontendAction::Execute() + 150
60 clang           0x0000000000785555
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 341
61 clang           0x000000000076d3dd
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1421
62 clang           0x0000000000766e58 cc1_main(char const**, char const**, char
const*, void*) + 1160
63 clang           0x000000000075614f main + 4799
64 libc.so.6       0x00007f1bb76daa15 __libc_start_main + 245
65 clang           0x0000000000765d8d
Stack dump:
0.      Program arguments: /usr/local/clang-trunk/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
.coords_public_iface.tmp.cpp -mrelocation-model static -fmath-errno
-masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array
-target-cpu x86-64 -target-linker-version 2.23.1 -momit-leaf-frame-pointer -g
-coverage-file
/home/atomicity/work/neuroblaze/nb/CMakeFiles/generated/coords_public_iface.dir/.coords_public_iface.tmp.cpp.o
-resource-dir /usr/local/clang-trunk/bin/../lib/clang/3.3 -D NDEBUG -I
/opt/local/include -I /home/atomicity/work/neuroblaze/nb -I
/home/atomicity/work/neuroblaze/nb/../lib/cxxtest -fmodule-cache-path
/var/tmp/clang-module-cache -internal-isystem
/usr/lib64/gcc/x86_64-unknown-linux-gnu/4.7.2/../../../../include/c++/4.7.2
-internal-isystem
/usr/lib64/gcc/x86_64-unknown-linux-gnu/4.7.2/../../../../include/c++/4.7.2/x86_64-unknown-linux-gnu
-internal-isystem
/usr/lib64/gcc/x86_64-unknown-linux-gnu/4.7.2/../../../../include/c++/4.7.2/backward
-internal-isystem /usr/local/include -internal-isystem
/usr/local/clang-trunk/bin/../lib/clang/3.3/include -internal-externc-isystem
/include -internal-externc-isystem /usr/include -O3 -Wall -Wshadow -Wextra
-Wno-c++98-compat -pedantic -std=c++11 -fdeprecated-macro
-fdebug-compilation-dir /home/atomicity/work/neuroblaze/nb -ferror-limit 19
-fmessage-length 306 -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o
CMakeFiles/generated/coords_public_iface.dir/.coords_public_iface.tmp.cpp.o -x
c++ /home/atomicity/work/neuroblaze/nb/.coords_public_iface.tmp.cpp 
1.     
/home/atomicity/work/neuroblaze/nb/tests/coords_public_iface.t.hpp:15:55:
current parser token ')'
2.      /home/atomicity/work/neuroblaze/nb/tests/coords_public_iface.t.hpp:7:1:
parsing struct/union/class body 'test_cpu_coordinates_public_iface'
3.     
/home/atomicity/work/neuroblaze/nb/tests/coords_public_iface.t.hpp:10:22:
parsing function body 'test_create'
4.     
/home/atomicity/work/neuroblaze/nb/tests/coords_public_iface.t.hpp:10:22: in
compound statement ('{}')
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.3 (trunk 169722)
Target: x86_64-unknown-linux-gnu
Thread model: posix

-- 
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