[LLVMbugs] [Bug 9230] New: "Unresolved overloaded function" assertion failure
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Feb 15 15:03:59 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=9230
Summary: "Unresolved overloaded function" assertion failure
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++0x
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: marc.glisse at normalesup.org
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
$ clang++ -fsyntax-only -std=c++0x a.cc
template <class > struct remove_reference {
};
template <class _Tp> struct remove_reference<_Tp&> {
};
struct pair {
template<class _Tuple, class = typename remove_reference<_Tuple >::type
> pair(_Tuple&& ) {
}
};
template <class > struct basic_ostream;
typedef basic_ostream<char> ostream;
template <class _CharT> void endl(basic_ostream<_CharT>& __os) {
}
void operator<<(ostream& os, const pair& ) {
os << endl;
}
clang: /data/repos/llvm/tools/clang/lib/Sema/SemaTemplateDeduction.cpp:971:
clang::Sema::TemplateDeductionResult DeduceTemplateArguments(clang::Sema&,
clang::TemplateParameterList*, clang::QualType, clang::QualType,
clang::sema::TemplateDeductionInfo&,
llvm::SmallVectorImpl<clang::DeducedTemplateArgument>&, unsigned int, bool,
llvm::SmallVectorImpl<RefParamPartialOrderingComparison>*): Assertion `Arg !=
S.Context.OverloadTy && "Unresolved overloaded function"' failed.
0 clang 0x000000000179c47f
1 clang 0x000000000179e6e2
2 libpthread.so.0 0x00007fef5ea15f60
3 libc.so.6 0x00007fef5dd28165 gsignal + 53
4 libc.so.6 0x00007fef5dd2af70 abort + 384
5 libc.so.6 0x00007fef5dd212b1 __assert_fail + 241
6 clang 0x0000000000ac1de9
7 clang 0x0000000000ac1144
8 clang 0x0000000000ac3119
9 clang 0x0000000000ac34dd
10 clang 0x0000000000ac48ab
clang::Sema::DeduceTemplateArguments(clang::ClassTemplatePartialSpecializationDecl*,
clang::TemplateArgumentList const&, clang::sema::TemplateDeductionInfo&) + 219
11 clang 0x0000000000add50e
clang::Sema::InstantiateClassTemplateSpecialization(clang::SourceLocation,
clang::ClassTemplateSpecializationDecl*, clang::TemplateSpecializationKind,
bool) + 542
12 clang 0x0000000000b16f81
clang::Sema::RequireCompleteType(clang::SourceLocation, clang::QualType,
clang::PartialDiagnostic const&, std::pair<clang::SourceLocation,
clang::PartialDiagnostic>) + 1201
13 clang 0x0000000000b177df
clang::Sema::RequireCompleteType(clang::SourceLocation, clang::QualType,
clang::PartialDiagnostic const&) + 79
14 clang 0x000000000091bae5
clang::Sema::RequireCompleteDeclContext(clang::CXXScopeSpec&,
clang::DeclContext*) + 437
15 clang 0x0000000000a84de4
clang::Sema::CheckTypenameType(clang::ElaboratedTypeKeyword,
clang::NestedNameSpecifier*, clang::IdentifierInfo const&,
clang::SourceLocation, clang::SourceRange, clang::SourceLocation) + 132
16 clang 0x0000000000ae09e6
17 clang 0x0000000000ada45b
18 clang 0x0000000000adb54f
19 clang 0x0000000000adbc12
clang::Sema::SubstType(clang::TypeSourceInfo*,
clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation,
clang::DeclarationName) + 66
20 clang 0x0000000000a786aa
21 clang 0x0000000000a7c025
clang::Sema::SubstDefaultTemplateArgumentIfAvailable(clang::TemplateDecl*,
clang::SourceLocation, clang::SourceLocation, clang::Decl*,
llvm::SmallVectorImpl<clang::TemplateArgument>&) + 213
22 clang 0x0000000000abd593
clang::Sema::FinishTemplateArgumentDeduction(clang::FunctionTemplateDecl*,
llvm::SmallVectorImpl<clang::DeducedTemplateArgument>&, unsigned int,
clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&) + 1683
23 clang 0x0000000000ac7baa
clang::Sema::DeduceTemplateArguments(clang::FunctionTemplateDecl*,
clang::TemplateArgumentListInfo const*, clang::Expr**, unsigned int,
clang::FunctionDecl*&, clang::sema::TemplateDeductionInfo&) + 1706
24 clang 0x0000000000a52b11
clang::Sema::AddTemplateOverloadCandidate(clang::FunctionTemplateDecl*,
clang::DeclAccessPair, clang::TemplateArgumentListInfo const*, clang::Expr**,
unsigned int, clang::OverloadCandidateSet&, bool) + 353
25 clang 0x0000000000a531d8
26 clang 0x0000000000a53b3c
27 clang 0x0000000000a4f82f
28 clang 0x0000000000a4fc06
29 clang 0x0000000000a52555
clang::Sema::AddOverloadCandidate(clang::FunctionDecl*, clang::DeclAccessPair,
clang::Expr**, unsigned int, clang::OverloadCandidateSet&, bool, bool) + 1477
30 clang 0x0000000000a55ee2
clang::Sema::AddFunctionCandidates(clang::UnresolvedSetImpl const&,
clang::Expr**, unsigned int, clang::OverloadCandidateSet&, bool) + 130
31 clang 0x0000000000a63ab9
clang::Sema::CreateOverloadedBinOp(clang::SourceLocation, unsigned int,
clang::UnresolvedSetImpl const&, clang::Expr*, clang::Expr*) + 745
32 clang 0x00000000009f9f29 clang::Sema::BuildBinOp(clang::Scope*,
clang::SourceLocation, clang::BinaryOperatorKind, clang::Expr*, clang::Expr*) +
217
33 clang 0x00000000009fa144 clang::Sema::ActOnBinOp(clang::Scope*,
clang::SourceLocation, clang::tok::TokenKind, clang::Expr*, clang::Expr*) + 196
34 clang 0x00000000008e03ef
clang::Parser::ParseRHSOfBinaryExpression(clang::ActionResult<clang::Expr*,
true>, clang::prec::Level) + 671
35 clang 0x00000000008e307e
clang::Parser::ParseAssignmentExpression() + 46
36 clang 0x00000000008e0ee9 clang::Parser::ParseExpression() + 9
37 clang 0x00000000008b9d85
clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::Stmt*,
32u>&, bool) + 309
38 clang 0x00000000008ba743
clang::Parser::ParseCompoundStatementBody(bool) + 403
39 clang 0x00000000008bad61
clang::Parser::ParseFunctionStatementBody(clang::Decl*) + 145
40 clang 0x00000000008c5d33
clang::Parser::ParseFunctionDefinition(clang::Parser::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&) + 707
41 clang 0x00000000008ccc3f
clang::Parser::ParseDeclGroup(clang::Parser::ParsingDeclSpec&, unsigned int,
bool, clang::SourceLocation*) + 1535
42 clang 0x00000000008c4932
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsingDeclSpec&,
clang::AccessSpecifier) + 146
43 clang 0x00000000008c4d39
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&,
clang::AccessSpecifier) + 409
44 clang 0x00000000008c6ee2
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) + 1506
45 clang 0x00000000008c701d
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 109
46 clang 0x00000000008ada13 clang::ParseAST(clang::Sema&, bool) + 147
47 clang 0x0000000000673a35
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 357
48 clang 0x000000000064febc
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1276
49 clang 0x0000000000647705 cc1_main(char const**, char const**, char
const*, void*) + 677
50 clang 0x000000000064eec5 main + 4629
51 libc.so.6 0x00007f8a7a87bc4d __libc_start_main + 253
52 clang 0x0000000000645ca9
Stack dump:
0. Program arguments: /tmp/clang/inst/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -fsyntax-only -disable-free -main-file-name a.cc
-mrelocation-model static -mdisable-fp-elim -masm-verbose -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -target-linker-version 2.20.1
-momit-leaf-frame-pointer -resource-dir /tmp/clang/inst/bin/../lib/clang/2.9
-std=c++0x -ferror-limit 19 -fmessage-length 158 -fexceptions -fgnu-runtime
-fdiagnostics-show-option -fcolor-diagnostics -x c++ a.cc
1. a.cc:14:12: current parser token ';'
2. a.cc:13:44: parsing function body 'operator<<'
3. a.cc:13:44: in compound statement ('{}')
--
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