[LLVMbugs] [Bug 14115] New: clang assertion failure on incompatible std::vector comparison.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Oct 18 03:49:39 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=14115
Bug #: 14115
Summary: clang assertion failure on incompatible std::vector
comparison.
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: kiki at kmonos.net
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 9378
--> http://llvm.org/bugs/attachment.cgi?id=9378
preprocessed source
Encountered on:
- clang version 3.2 (trunk 166174) (Target: x86_64-unknown-linux-gnu)
- clang version 3.2 (trunk 163674) (Target: x86_64-unknown-linux-gnu)
- clang version 3.2 (trunk 163674) (Target: x86_64-apple-darwin12.2.0)
$ cat x.cc
#include <vector>
int main() {
std::vector<int> a;
std::vector<float> b;
a == b;
}
$ ./build/Debug+Asserts/bin/clang x.cc
x.cc:6:5: error: invalid operands to binary expression ('std::vector<int>' and
'std::vector<float>')
x == y;
~ ^ ~
clang: /tmp/llvm/tools/clang/lib/Basic/Diagnostic.cpp:745: void
clang::Diagnostic::FormatDiagnostic(const char *, const char *,
SmallVectorImpl<char> &) const: Assertion `ModifierLen == 0 && "No modifiers
for strings yet"' failed.
0 clang 0x0000000002cac57e
1 clang 0x0000000002caca7a
2 libpthread.so.0 0x00007fdc48dc18f0
3 libc.so.6 0x00007fdc480ada75 gsignal + 53
4 libc.so.6 0x00007fdc480b15c0 abort + 384
5 libc.so.6 0x00007fdc480a6941 __assert_fail + 241
6 clang 0x0000000001bb9dfc clang::Diagnostic::FormatDiagnostic(char
const*, char const*, llvm::SmallVectorImpl<char>&) const + 1340
7 clang 0x0000000001bb98b0
clang::Diagnostic::FormatDiagnostic(llvm::SmallVectorImpl<char>&) const + 224
8 clang 0x0000000000821442
clang::TextDiagnosticPrinter::HandleDiagnostic(clang::DiagnosticsEngine::Level,
clang::Diagnostic const&) + 82
9 clang 0x0000000001bc162f
clang::DiagnosticIDs::EmitDiag(clang::DiagnosticsEngine&,
clang::DiagnosticIDs::Level) const + 111
10 clang 0x0000000001bc14dd
clang::DiagnosticIDs::ProcessDiag(clang::DiagnosticsEngine&) const + 765
11 clang 0x0000000001bbc7c1
12 clang 0x0000000001bb969b
clang::DiagnosticsEngine::EmitCurrentDiagnostic(bool) + 251
13 clang 0x0000000000cfd7ce
clang::Sema::EmitCurrentDiagnostic(unsigned int) + 1038
14 clang 0x0000000000d0fb7b
15 clang 0x0000000000d01035
16 clang 0x0000000000ff507f
17 clang 0x0000000000fe51b0
18 clang 0x0000000000fd6973
clang::OverloadCandidateSet::NoteCandidates(clang::Sema&,
clang::OverloadCandidateDisplayKind, llvm::ArrayRef<clang::Expr*>,
llvm::StringRef, clang::SourceLocation) + 723
19 clang 0x0000000000feb5e1
clang::Sema::CreateOverloadedBinOp(clang::SourceLocation, unsigned int,
clang::UnresolvedSetImpl const&, clang::Expr*, clang::Expr*) + 5201
20 clang 0x0000000000eb09ba
21 clang 0x0000000000eb0862 clang::Sema::BuildBinOp(clang::Scope*,
clang::SourceLocation, clang::BinaryOperatorKind, clang::Expr*, clang::Expr*) +
1218
22 clang 0x0000000000e8c783 clang::Sema::ActOnBinOp(clang::Scope*,
clang::SourceLocation, clang::tok::TokenKind, clang::Expr*, clang::Expr*) + 211
23 clang 0x0000000000ca1bd8
clang::Parser::ParseRHSOfBinaryExpression(clang::ActionResult<clang::Expr*,
true>, clang::prec::Level) + 3848
24 clang 0x0000000000ca0cb6
clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) + 230
25 clang 0x0000000000ca0b9f
clang::Parser::ParseExpression(clang::Parser::TypeCastState) + 31
26 clang 0x0000000000cd15e2 clang::Parser::ParseExprStatement() + 66
27 clang 0x0000000000cd0d1c
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&)
+ 2076
28 clang 0x0000000000cd03e5
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 133
29 clang 0x0000000000cd7089
clang::Parser::ParseCompoundStatementBody(bool) + 1465
30 clang 0x0000000000cd8b6a
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 282
31 clang 0x0000000000c66937
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&,
llvm::SmallVector<clang::Parser::LateParsedAttribute*, 2u>*) + 3751
32 clang 0x0000000000c7ceae
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 462
33 clang 0x0000000000c65a7d
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 1133
34 clang 0x0000000000c65253
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 147
35 clang 0x0000000000c649f8
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 3384
36 clang 0x0000000000c63c82
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 466
37 clang 0x0000000000c600c6 clang::ParseAST(clang::Sema&, bool, bool)
+ 550
38 clang 0x00000000007f6fd8 clang::ASTFrontendAction::ExecuteAction()
+ 312
39 clang 0x0000000000a5d6b2 clang::CodeGenAction::ExecuteAction() +
1266
40 clang 0x00000000007f6bed clang::FrontendAction::Execute() + 237
41 clang 0x00000000007c8738
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 776
42 clang 0x000000000078d8a7
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 999
43 clang 0x0000000000777789 cc1_main(char const**, char const**, char
const*, void*) + 969
44 clang 0x0000000000787479 main + 473
45 libc.so.6 0x00007fdc48098c4d __libc_start_main + 253
46 clang 0x00000000007772f9
Stack dump:
0. Program arguments: /tmp/build/Debug+Asserts/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name
x.cc -mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version
2.20.1 -momit-leaf-frame-pointer -resource-dir
/tmp/build/Debug+Asserts/bin/../lib/clang/3.2 -fmodule-cache-path
/var/tmp/clang-module-cache -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.4/../../../../include/c++/4.4 -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.4/../../../../include/c++/4.4/x86_64-linux-gnu
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.4/../../../../include/c++/4.4/backward
-internal-isystem /usr/local/include -internal-isystem
/tmp/build/Debug+Asserts/bin/../lib/clang/3.2/include -internal-externc-isystem
/include -internal-externc-isystem /usr/include -fdeprecated-macro
-fdebug-compilation-dir /tmp -ferror-limit 19 -fmessage-length 230
-mstackrealign -fobjc-runtime=gcc -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -o /tmp/x-6DMZ0h.o -x c++ x.cc
1. x.cc:6:9: current parser token ';'
2. x.cc:3:12: parsing function body 'main'
3. x.cc:3:12: in compound statement ('{}')
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.2 (trunk 166174)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/x-C2HP0B.cpp
clang: note: diagnostic msg: /tmp/x-C2HP0B.sh
clang: note: diagnostic msg:
********************
--
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