[LLVMbugs] [Bug 10403] New: [C++] aborts during compilation
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jul 18 16:48:22 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=10403
Summary: [C++] aborts during compilation
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++0x
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: pipping at exherbo.org
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
Created an attachment (id=6906)
--> (http://llvm.org/bugs/attachment.cgi?id=6906)
delta-reduced input (not valid code but manages to make clang++ crash)
The following happens when colour_pretty_printer.cc is compiled with `clang++
-std=c++0x` and headers from libc++:
clang: SemaInit.cpp:3951: ExprResult
clang::InitializationSequence::Perform(clang::Sema &, const
clang::InitializedEntity &, const clang::InitializationKind &, MultiExprArg,
clang::QualType *): Assertion `Kind.getKind() == InitializationKind::IK_Copy ||
Kind.isExplicitCast()' failed.
0 libLLVM-3.0svn.so 0x00007f6fdcf218af
1 libLLVM-3.0svn.so 0x00007f6fdcf21c21
2 libpthread.so.0 0x00007f6fdb97aff0
3 libc.so.6 0x00007f6fdac98605 gsignal + 53
4 libc.so.6 0x00007f6fdac99905 abort + 389
5 libc.so.6 0x00007f6fdac91235 __assert_fail + 245
6 clang 0x0000000000db32ce
clang::InitializationSequence::Perform(clang::Sema&, clang::InitializedEntity
const&, clang::InitializationKind const&, clang::ASTMultiPtr<clang::Expr*>,
clang::QualType*) + 7758
7 clang 0x0000000000d0ee95
clang::Sema::AddInitializerToDecl(clang::Decl*, clang::Expr*, bool, bool) +
1797
8 clang 0x0000000000c91d1e
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&) + 1614
9 clang 0x0000000000c9145a
clang::Parser::ParseDeclGroup(clang::Parser::ParsingDeclSpec&, unsigned int,
bool, clang::SourceLocation*, clang::Parser::ForRangeInit*) + 714
10 clang 0x0000000000c8f921
clang::Parser::ParseSimpleDeclaration(clang::ASTOwningVector<clang::Stmt*,
32u>&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&, bool,
clang::Parser::ForRangeInit*) + 289
11 clang 0x0000000000c8f70b
clang::Parser::ParseDeclaration(clang::ASTOwningVector<clang::Stmt*, 32u>&,
unsigned int, clang::SourceLocation&,
clang::Parser::ParsedAttributesWithRange&) + 187
12 clang 0x0000000000c793f4
clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::Stmt*,
32u>&, bool) + 804
13 clang 0x0000000000c7ccd3
clang::Parser::ParseCompoundStatementBody(bool) + 867
14 clang 0x0000000000c7d6e7
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 151
15 clang 0x0000000000c87bb5
clang::Parser::ParseFunctionDefinition(clang::Parser::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&) + 1493
16 clang 0x0000000000c7f30d
clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int,
clang::Parser::ParsedTemplateInfo const&,
clang::Parser::ParsingDeclRAIIObject&, clang::SourceLocation&,
clang::AccessSpecifier) + 749
17 clang 0x0000000000c7ee28
clang::Parser::ParseTemplateDeclarationOrSpecialization(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier) + 680
18 clang 0x0000000000c7eaf0
clang::Parser::ParseDeclarationStartingWithTemplate(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier) + 112
19 clang 0x0000000000c8f74c
clang::Parser::ParseDeclaration(clang::ASTOwningVector<clang::Stmt*, 32u>&,
unsigned int, clang::SourceLocation&,
clang::Parser::ParsedAttributesWithRange&) + 252
20 clang 0x0000000000c86c77
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) + 1239
21 clang 0x0000000000c993b2
clang::Parser::ParseInnerNamespace(std::vector<clang::SourceLocation,
std::allocator<clang::SourceLocation> >&, std::vector<clang::IdentifierInfo*,
std::allocator<clang::IdentifierInfo*> >&, std::vector<clang::SourceLocation,
std::allocator<clang::SourceLocation> >&, unsigned int, clang::SourceLocation&,
clang::SourceLocation&, clang::ParsedAttributes&, clang::SourceLocation&) + 130
22 clang 0x0000000000c990c4 clang::Parser::ParseNamespace(unsigned
int, clang::SourceLocation&, clang::SourceLocation) + 2324
23 clang 0x0000000000c8f7c5
clang::Parser::ParseDeclaration(clang::ASTOwningVector<clang::Stmt*, 32u>&,
unsigned int, clang::SourceLocation&,
clang::Parser::ParsedAttributesWithRange&) + 373
24 clang 0x0000000000c86c77
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::Parser::ParsingDeclSpec*) + 1239
25 clang 0x0000000000c86774
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 212
26 clang 0x0000000000c6feaf clang::ParseAST(clang::Sema&, bool) +
335
27 clang 0x0000000000b6ce71 clang::CodeGenAction::ExecuteAction() +
641
28 clang 0x0000000000a89d07 clang::FrontendAction::Execute() + 231
29 clang 0x0000000000a773aa
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 506
30 clang 0x0000000000a599e0
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 640
31 clang 0x0000000000a4fa81 cc1_main(char const**, char const**,
char const*, void*) + 657
32 clang 0x0000000000a56180 main + 368
33 libc.so.6 0x00007f6fdac84c7d __libc_start_main + 253
34 clang 0x0000000000a4f729
Stack dump:
0. Program arguments: /usr/bin/clang -cc1 -triple x86_64-pc-linux-gnu
-emit-obj -mrelax-all -disable-free -main-file-name colour_pretty_printer.2.ii
-mrelocation-model static -mdisable-fp-elim -masm-verbose -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -target-linker-version 2.21.1
-momit-leaf-frame-pointer -coverage-file colour_pretty_printer.2.o
-resource-dir /usr/bin/../lib/clang/3.0 -std=c++0x -fdeprecated-macro
-ferror-limit 19 -fmessage-length 238 -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -o colour_pretty_printer.2.o -x
c++-cpp-output colour_pretty_printer.2.ii
1. colour_pretty_printer.2.ii:10:68: current parser token ';'
2. colour_pretty_printer.2.ii:1:1: parsing namespace 'std'
3. colour_pretty_printer.2.ii:8:3: parsing function body 'operator<<'
4. colour_pretty_printer.2.ii:8:3: in compound statement ('{}')
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal 2 (use -v to see
invocation)
As a result of running multidelta, the attached file is not valid C++ code.
This is with clang version 3.0 git-1fba8281b9fab5bf11c4083e88f31047413f94f2.
--
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