[LLVMbugs] [Bug 7179] New: assert on warning
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu May 20 03:59:57 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7179
Summary: assert on warning
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=4913)
--> (http://llvm.org/bugs/attachment.cgi?id=4913)
Code which crashes with warnings enabled.
clang asserts on the following code when given '-Wall', but compiles it fine
without that flag, as does g++. Comeau rejects it.
Backtrace:
$ clang++ warning_assert.cc -Wall
Assertion failed: (PrevInit && "initializer not found in initializer list"),
function DiagnoseBaseOrMemInitializerOrder, file SemaDeclCXX.cpp, line 1980.
0 clang 0x0000000100ff23f8 PrintStackTrace(void*) + 38
1 clang 0x0000000100ff28d8 SignalHandler(int) + 312
2 libSystem.B.dylib 0x00007fff880a580a _sigtramp + 26
3 clang 0x0000000100400ab0
clang::TypeSpecTypeLoc::setNameLoc(clang::SourceLocation) + 24
4 libSystem.B.dylib 0x00007fff88120ef0 __pthread_markcancel + 0
5 clang 0x00000001002cb5d8
DiagnoseBaseOrMemInitializerOrder(clang::Sema&, clang::CXXConstructorDecl
const*, clang::CXXBaseOrMemberInitializer**, unsigned int) + 614
6 clang 0x00000001002cdb93
clang::Sema::ActOnMemInitializers(clang::OpaquePtr<0>, clang::SourceLocation,
void**, unsigned int, bool) + 537
7 clang 0x000000010061034c
clang::Parser::ParseConstructorInitializer(clang::OpaquePtr<0>) + 448
8 clang 0x00000001005feb78
clang::Parser::ParseLexedMethodDefs(clang::Parser::ParsingClass&) + 1098
9 clang 0x00000001005fedd6
clang::Parser::ParseLexedMethodDefs(clang::Parser::ParsingClass&) + 1704
10 clang 0x00000001006131aa
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, unsigned int,
clang::OpaquePtr<0>) + 1518
11 clang 0x000000010061459a
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool) + 4922
12 clang 0x0000000100607b37
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext) + 6275
13 clang 0x0000000100646336
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsingDeclSpec&,
clang::AttributeList*, clang::AccessSpecifier) + 118
14 clang 0x0000000100646749
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::AttributeList*,
clang::AccessSpecifier) + 83
15 clang 0x0000000100648485
clang::Parser::ParseExternalDeclaration(clang::CXX0XAttributeList) + 2211
16 clang 0x00000001006485c3
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<1>&) + 247
17 clang 0x000000010024d503 clang::ParseAST(clang::Preprocessor&,
clang::ASTConsumer*, clang::ASTContext&, bool, bool,
clang::CodeCompleteConsumer*) + 456
18 clang 0x0000000100067402
clang::ASTFrontendAction::ExecuteAction() + 256
19 clang 0x00000001000674ff clang::FrontendAction::Execute() + 239
20 clang 0x000000010004a17c
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 784
21 clang 0x0000000100027b8a cc1_main(char const**, char const**,
char const*, void*) + 1761
22 clang 0x000000010002bec1 main + 252
23 clang 0x0000000100026a2c start + 52
24 clang 0x0000000000000021 start + 4294809129
Stack dump:
0. Program arguments: /usr/local/bin/clang -cc1 -triple
x86_64-apple-darwin10.0.0 -emit-obj -disable-free -main-file-name
warning_assert.cc -pic-level 1 -mdisable-fp-elim -masm-verbose -munwind-tables
-target-cpu core2 -resource-dir /usr/local/lib/clang/2.0 -Wall -ferror-limit 19
-fmessage-length 177 -stack-protector 1 -fblocks -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -o
/var/folders/M8/M86fCFVgGQ0r-V2oY5lLC++++TI/-Tmp-/cc-bcozsy.o -x c++
warning_assert.cc
1. warning_assert.cc:7:3: current parser token '{'
2. warning_assert.cc:1:1: parsing struct/union/class body
'mpi_datatype_primitive'
clang: error: assembler 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