[LLVMbugs] [Bug 7017] New: Assertion failed : point of instantiation must be valid!

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun May 2 16:18:40 PDT 2010


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

           Summary: Assertion failed : point of instantiation must be
                    valid!
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: chris at bubblescope.net
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


Created an attachment (id=4801)
 --> (http://llvm.org/bugs/attachment.cgi?id=4801)
Testcase

The following test case, reduced from a boost instance, compiles in g++ and
asserts clang.

Backtrace:

~/Dropbox$ clang++ -c point_of.cc 
Assertion failed: (Loc.isValid() && "point of instantiation must be valid!"),
function setPointOfInstantiation, file
/Users/caj/clang/llvm/tools/clang/lib/Sema/../../include/clang/AST/DeclTemplate.h,
line 909.
0  clang             0x00f54489 PrintStackTrace(void*) + 45
1  clang             0x00f549d3 SignalHandler(int) + 374
2  libSystem.B.dylib 0x91cc842b _sigtramp + 43
3  libSystem.B.dylib 0xffffffff _sigtramp + 1848867839
4  libSystem.B.dylib 0x91d558e5 raise + 26
5  libSystem.B.dylib 0x91d6b99c abort + 93
6  libSystem.B.dylib 0x91d58544 __pthread_markcancel + 0
7  clang             0x003cc6fb
clang::ClassTemplateSpecializationDecl::setPointOfInstantiation(clang::SourceLocation)
+ 91
8  clang             0x003bd245
clang::Sema::InstantiateClass(clang::SourceLocation, clang::CXXRecordDecl*,
clang::CXXRecordDecl*, clang::MultiLevelTemplateArgumentList const&,
clang::TemplateSpecializationKind, bool) + 585
9  clang             0x003c44d7
clang::Sema::InstantiateClassTemplateSpecialization(clang::SourceLocation,
clang::ClassTemplateSpecializationDecl*, clang::TemplateSpecializationKind,
bool) + 1609
10 clang             0x003da635
clang::Sema::RequireCompleteType(clang::SourceLocation, clang::QualType,
clang::PartialDiagnostic const&, std::pair<clang::SourceLocation,
clang::PartialDiagnostic>) + 259
11 clang             0x003daabc
clang::Sema::RequireCompleteType(clang::SourceLocation, clang::QualType,
clang::PartialDiagnostic const&) + 114
12 clang             0x00345b48
clang::Sema::CompareReferenceRelationship(clang::SourceLocation,
clang::QualType, clang::QualType, bool&) + 442
13 clang             0x0034eabe clang::TryReferenceInit(clang::Sema&,
clang::Expr*&, clang::QualType, clang::SourceLocation, bool, bool) + 556
14 clang             0x0034f581 clang::TryCopyInitialization(clang::Sema&,
clang::Expr*, clang::QualType, bool, bool) + 106
15 clang             0x0034d02f
clang::Sema::AddOverloadCandidate(clang::FunctionDecl*, clang::DeclAccessPair,
clang::Expr**, unsigned int, clang::OverloadCandidateSet&, bool, bool) + 1171
16 clang             0x0031fbe5 TryConstructorInitialization(clang::Sema&,
clang::InitializedEntity const&, clang::InitializationKind const&,
clang::Expr**, unsigned int, clang::QualType, clang::InitializationSequence&) +
792
17 clang             0x003238d1
clang::InitializationSequence::InitializationSequence(clang::Sema&,
clang::InitializedEntity const&, clang::InitializationKind const&,
clang::Expr**, unsigned int) + 1009
18 clang             0x002bdcfb BuildImplicitBaseInitializer(clang::Sema&,
clang::CXXConstructorDecl*, ImplicitInitializerKind, clang::CXXBaseSpecifier*,
bool, clang::CXXBaseOrMemberInitializer*&) + 844
19 clang             0x002be3d0
clang::Sema::SetBaseOrMemberInitializers(clang::CXXConstructorDecl*,
clang::CXXBaseOrMemberInitializer**, unsigned int, bool) + 1022
20 clang             0x002be82e
clang::Sema::DefineImplicitCopyConstructor(clang::SourceLocation,
clang::CXXConstructorDecl*, unsigned int) + 262
21 clang             0x002da851
clang::Sema::MarkDeclarationReferenced(clang::SourceLocation, clang::Decl*) +
635
22 clang             0x002bea62
clang::Sema::DefineImplicitCopyConstructor(clang::SourceLocation,
clang::CXXConstructorDecl*, unsigned int) + 826
23 clang             0x002da851
clang::Sema::MarkDeclarationReferenced(clang::SourceLocation, clang::Decl*) +
635
24 clang             0x0034a3c5
clang::Sema::BestViableFunction(clang::OverloadCandidateSet&,
clang::SourceLocation, clang::OverloadCandidate*&) + 487
25 clang             0x0031ef6c CopyObject(clang::Sema&, clang::QualType,
clang::InitializedEntity const&,
clang::ASTOwningResult<&(clang::ActionBase::DeleteExpr(void*))>, bool) + 1055
26 clang             0x003255f7
clang::InitializationSequence::Perform(clang::Sema&, clang::InitializedEntity
const&, clang::InitializationKind const&,
clang::ASTMultiPtr<&(clang::ActionBase::DeleteExpr(void*))>, clang::QualType*)
+ 3937
27 clang             0x00326fe5
clang::Sema::PerformCopyInitialization(clang::InitializedEntity const&,
clang::SourceLocation,
clang::ASTOwningResult<&(clang::ActionBase::DeleteExpr(void*))>) + 425
28 clang             0x00358ea4
clang::Sema::CreateOverloadedBinOp(clang::SourceLocation, unsigned int,
clang::UnresolvedSetImpl const&, clang::Expr*, clang::Expr*) + 2170
29 clang             0x002f3a99 clang::Sema::BuildBinOp(clang::Scope*,
clang::SourceLocation, clang::BinaryOperator::Opcode, clang::Expr*,
clang::Expr*) + 295
30 clang             0x002f3c41 clang::Sema::ActOnBinOp(clang::Scope*,
clang::SourceLocation, clang::tok::TokenKind,
clang::ASTOwningResult<&(clang::ActionBase::DeleteExpr(void*))>,
clang::ASTOwningResult<&(clang::ActionBase::DeleteExpr(void*))>) + 263
31 clang             0x005eade5
clang::Parser::ParseRHSOfBinaryExpression(clang::ASTOwningResult<&(clang::ActionBase::DeleteExpr(void*))>,
clang::prec::Level) + 2501
32 clang             0x005e339e clang::Parser::ParseAssignmentExpression() +
444
33 clang             0x005e37db clang::Parser::ParseExpression() + 25
34 clang             0x00603fc3
clang::Parser::ParseStatementOrDeclaration(bool) + 1679
35 clang             0x006086cb clang::Parser::ParseCompoundStatementBody(bool)
+ 215
36 clang             0x00608d2f
clang::Parser::ParseFunctionStatementBody(clang::OpaquePtr<0>) + 199
37 clang             0x00612362
clang::Parser::ParseFunctionDefinition(clang::Parser::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&) + 1196
38 clang             0x005d5f15
clang::Parser::ParseDeclGroup(clang::Parser::ParsingDeclSpec&, unsigned int,
bool, clang::SourceLocation*) + 483
39 clang             0x006113df
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsingDeclSpec&,
clang::AttributeList*, clang::AccessSpecifier) + 1001
40 clang             0x0061142c
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::AttributeList*,
clang::AccessSpecifier) + 66
41 clang             0x006131a4
clang::Parser::ParseExternalDeclaration(clang::CXX0XAttributeList) + 2222
42 clang             0x006132ea
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<1>&) + 268
43 clang             0x0023ff35 clang::ParseAST(clang::Preprocessor&,
clang::ASTConsumer*, clang::ASTContext&, bool, bool,
clang::CodeCompleteConsumer*) + 426
44 clang             0x00063d6f clang::ASTFrontendAction::ExecuteAction() + 269
45 clang             0x00063e8c clang::FrontendAction::Execute() + 278
46 clang             0x00047ea3
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 879
47 clang             0x0002ab7f cc1_main(char const**, char const**, char
const*, void*) + 1979
48 clang             0x0002eaa5 main + 272
49 clang             0x000298bd start + 53
Stack dump:
0.    Program arguments: /usr/local/bin/clang -cc1 -triple
i386-apple-darwin10.0.0 -S -disable-free -main-file-name point_of.cc -pic-level
1 -mdisable-fp-elim -target-cpu yonah -resource-dir /usr/local/lib/clang/2.0
-ferror-limit 19 -ftemplate-backtrace-limit 10 -fmessage-length 129
-stack-protector 1 -fblocks -fexceptions -fdiagnostics-show-option
-fcolor-diagnostics -o
/var/folders/M8/M86fCFVgGQ0r-V2oY5lLC++++TI/-Tmp-/cc-nM1uAs.s -x c++
point_of.cc 
1.    point_of.cc:32:23: current parser token ';'
2.    point_of.cc:29:1: parsing function body 'test_main'
3.    point_of.cc:29:1: in compound statement ('{}')
clang: error: compiler command failed due to signal 6 (use -v to see
invocation)
~/Dropbox$

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