[LLVMbugs] [Bug 10329] New: assertion failure on invalid combination of late-specified return type and 'new'.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jul 11 05:25:42 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=10329
Summary: assertion failure on invalid combination of
late-specified return type and 'new'.
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++0x
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: richard-llvm at metafoo.co.uk
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
$ echo 'void f() { new (auto()->int); }' | clang -cc1 -x c++ -std=c++0x
clang: lib/Frontend/TextDiagnosticPrinter.cpp:130: void
clang::TextDiagnosticPrinter::HighlightRange(const clang::CharSourceRange&,
const clang::SourceManager&, unsigned int, clang::FileID, std::string&, const
std::string&): Assertion `StartColNo <= EndColNo && "Invalid range!"' failed.
0 clang 0x0000000001a7313f
1 clang 0x0000000001a753b2
2 libpthread.so.0 0x00007fc912426b40
3 libc.so.6 0x00007fc911724ba5 gsignal + 53
4 libc.so.6 0x00007fc9117286b0 abort + 384
5 libc.so.6 0x00007fc91171da71 __assert_fail + 241
6 clang 0x00000000006b2fc2
clang::TextDiagnosticPrinter::HighlightRange(clang::CharSourceRange const&,
clang::SourceManager const&, unsigned int, clang::FileID, std::string&,
std::string const&) + 1362
7 clang 0x00000000006b4145
clang::TextDiagnosticPrinter::EmitCaretDiagnostic(clang::SourceLocation,
clang::CharSourceRange*, unsigned int, clang::SourceManager const&,
clang::FixItHint const*, unsigned int, unsigned int, unsigned int, unsigned
int, unsigned int) + 4069
8 clang 0x00000000006b62ea
clang::TextDiagnosticPrinter::HandleDiagnostic(clang::Diagnostic::Level,
clang::DiagnosticInfo const&) + 4730
9 clang 0x0000000000fc9355
clang::DiagnosticIDs::ProcessDiag(clang::Diagnostic&) const + 565
10 clang 0x0000000000fc29b1 clang::DiagnosticBuilder::Emit() + 33
11 clang 0x0000000000950bf8
clang::Sema::SemaDiagnosticBuilder::~SemaDiagnosticBuilder() + 248
12 clang 0x0000000000a76f1c
clang::Sema::CheckAllocatedType(clang::QualType, clang::SourceLocation,
clang::SourceRange) + 444
13 clang 0x0000000000a866d2
clang::Sema::BuildCXXNew(clang::SourceLocation, bool, clang::SourceLocation,
clang::ASTMultiPtr<clang::Expr*>, clang::SourceLocation, clang::SourceRange,
clang::QualType, clang::TypeSourceInfo*, clang::Expr*, clang::SourceLocation,
clang::ASTMultiPtr<clang::Expr*>, clang::SourceLocation, bool) + 274
14 clang 0x0000000000a87cac
clang::Sema::ActOnCXXNew(clang::SourceLocation, bool, clang::SourceLocation,
clang::ASTMultiPtr<clang::Expr*>, clang::SourceLocation, clang::SourceRange,
clang::Declarator&, clang::SourceLocation, clang::ASTMultiPtr<clang::Expr*>,
clang::SourceLocation) + 364
15 clang 0x000000000093da2d
clang::Parser::ParseCXXNewExpression(bool, clang::SourceLocation) + 2141
16 clang 0x00000000009329fa clang::Parser::ParseCastExpression(bool,
bool, bool&, bool) + 2362
17 clang 0x000000000093300e clang::Parser::ParseCastExpression(bool,
bool, bool) + 46
18 clang 0x0000000000933072
clang::Parser::ParseAssignmentExpression() + 34
19 clang 0x0000000000930779 clang::Parser::ParseExpression() + 9
20 clang 0x00000000008fa573
clang::Parser::ParseExprStatement(clang::ParsedAttributes&) + 83
21 clang 0x00000000008f7ef3
clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::Stmt*,
32u>&, bool) + 2355
22 clang 0x00000000008f5935
clang::Parser::ParseCompoundStatementBody(bool) + 1605
23 clang 0x00000000008f5ef8
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 168
24 clang 0x000000000090b895
clang::Parser::ParseFunctionDefinition(clang::Parser::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&) + 1909
25 clang 0x0000000000918ed8
clang::Parser::ParseDeclGroup(clang::Parser::ParsingDeclSpec&, unsigned int,
bool, clang::SourceLocation*, clang::Parser::ForRangeInit*) + 1992
26 clang 0x0000000000909229
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsingDeclSpec&,
clang::AccessSpecifier) + 153
27 clang 0x00000000009096b2
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&,
clang::AccessSpecifier) + 530
28 clang 0x000000000090d005
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) + 2229
29 clang 0x000000000090d3ac
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 156
30 clang 0x00000000008e888d clang::ParseAST(clang::Sema&, bool) + 285
31 clang 0x000000000068a873
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 371
32 clang 0x00000000006726d7
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1319
33 clang 0x0000000000668558 cc1_main(char const**, char const**, char
const*, void*) + 760
34 clang 0x00000000006714f1 main + 7121
35 libc.so.6 0x00007fc91170fd8e __libc_start_main + 254
36 clang 0x0000000000667739
Stack dump:
0. Program arguments: clang -cc1 -x c++ -std=c++0x
1. <stdin>:1:29: current parser token ';'
2. <stdin>:1:10: parsing function body 'f'
3. <stdin>:1:10: in compound statement ('{}')
zsh: done echo 'void f() { new (auto()->int); }' |
zsh: abort clang -cc1 -x c++ -std=c++0x
--
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