[LLVMbugs] [Bug 8377] New: Assertion `Rep && "no type provided!"' on invalid code
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Oct 14 08:31:06 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=8377
Summary: Assertion `Rep && "no type provided!"' on invalid code
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
The code:
template <int>
struct def_helper {
void def_maybe_overloads( ) {
,def_helper<int>
}
};
Produces the following backtrace on
clang version 2.9 (trunk 116475)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang++ t.cc -c
t.cc:4:3: error: expected expression
,def_helper<int>
^
t.cc:4:15: error: template argument for non-type template parameter must be an
expression
,def_helper<int>
^~~
t.cc:1:14: note: template parameter is declared here
template <int>
^
clang: DeclSpec.cpp:298: bool
clang::DeclSpec::SetTypeSpecType(clang::TypeSpecifierType,
clang::SourceLocation, const char*&, unsigned int&, clang::ParsedType):
Assertion `Rep && "no type provided!"' failed.
0 clang 0x000000000165139f
1 clang 0x0000000001653612
2 libpthread.so.0 0x00007f0e453108f0
3 libc.so.6 0x00007f0e445ffa75 gsignal + 53
4 libc.so.6 0x00007f0e446035c0 abort + 384
5 libc.so.6 0x00007f0e445f8941 __assert_fail + 241
6 clang 0x00000000008d1330
clang::DeclSpec::SetTypeSpecType(clang::TypeSpecifierType,
clang::SourceLocation, char const*&, unsigned int&,
clang::OpaquePtr<clang::QualType>) + 144
7 clang 0x00000000008baf31
clang::Parser::ParseCXXSimpleTypeSpecifier(clang::DeclSpec&) + 913
8 clang 0x00000000008b49f2 clang::Parser::ParseCastExpression(bool,
bool, bool&, clang::OpaquePtr<clang::QualType>) + 258
9 clang 0x00000000008b59aa clang::Parser::ParseCastExpression(bool,
bool, clang::OpaquePtr<clang::QualType>) + 42
10 clang 0x00000000008b51db clang::Parser::ParseCastExpression(bool,
bool, bool&, clang::OpaquePtr<clang::QualType>) + 2283
11 clang 0x00000000008b59aa clang::Parser::ParseCastExpression(bool,
bool, clang::OpaquePtr<clang::QualType>) + 42
12 clang 0x00000000008b679e
clang::Parser::ParseAssignmentExpression() + 30
13 clang 0x00000000008b5bf3
clang::Parser::ParseRHSOfBinaryExpression(clang::ActionResult<clang::Expr*,
true>, clang::prec::Level) + 515
14 clang 0x00000000008b6c89 clang::Parser::ParseExpression() + 25
15 clang 0x00000000008913da
clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::Stmt*,
32u>&, bool) + 442
16 clang 0x0000000000891cf4
clang::Parser::ParseCompoundStatementBody(bool) + 404
17 clang 0x0000000000892336
clang::Parser::ParseFunctionStatementBody(clang::Decl*) + 118
18 clang 0x00000000008cadfa
clang::Parser::ParseLexedMethodDef(clang::Parser::LexedMethod&) + 426
19 clang 0x00000000008c927c
clang::Parser::ParseLexedMethodDefs(clang::Parser::ParsingClass&) + 124
20 clang 0x00000000008b1db4
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, unsigned int,
clang::Decl*) + 2020
21 clang 0x00000000008b2ad0
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool) + 2800
22 clang 0x00000000008a298c
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext) + 1996
23 clang 0x00000000008c5307
clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int,
clang::Parser::ParsedTemplateInfo const&,
clang::Parser::ParsingDeclRAIIObject&, clang::SourceLocation&,
clang::AccessSpecifier) + 535
24 clang 0x00000000008c8c15
clang::Parser::ParseTemplateDeclarationOrSpecialization(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier) + 693
25 clang 0x00000000008a8079
clang::Parser::ParseDeclaration(clang::ASTOwningVector<clang::Stmt*, 32u>&,
unsigned int, clang::SourceLocation&, clang::CXX0XAttributeList) + 409
26 clang 0x000000000089cb33
clang::Parser::ParseExternalDeclaration(clang::CXX0XAttributeList,
clang::Parser::ParsingDeclSpec*) + 1091
27 clang 0x000000000089cd72
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 114
28 clang 0x00000000008854fb clang::ParseAST(clang::Sema&, bool) + 139
29 clang 0x000000000075b444 clang::CodeGenAction::ExecuteAction() +
68
30 clang 0x0000000000661165
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 357
31 clang 0x0000000000640c5c
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1276
32 clang 0x0000000000638c1e cc1_main(char const**, char const**, char
const*, void*) + 622
33 clang 0x000000000063f777 main + 4087
34 libc.so.6 0x00007f0e445eac4d __libc_start_main + 253
35 clang 0x0000000000637409
Stack dump:
0. Program arguments: /usr/local/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -S -disable-free -main-file-name t.cc
-mrelocation-model static -mdisable-fp-elim -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -target-linker-version 2.20.1 -resource-dir
/usr/local/lib/clang/2.9 -ferror-limit 19 -fmessage-length 143 -fexceptions
-fgnu-runtime -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/cc-ejotv4.s
-x c++ t.cc
1. t.cc:4:4: at annotation token
2. t.cc:2:1: parsing struct/union/class body 'def_helper'
3. t.cc:3:31: parsing function body 'def_maybe_overloads'
4. t.cc:3:31: in compound statement ('{}')
clang: error: clang frontend command failed due to signal 6 (use -v to see
invocation)
--
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