[LLVMbugs] [Bug 19337] New: Assert: illegal float point comparison
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Apr 4 01:40:55 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=19337
Bug ID: 19337
Summary: Assert: illegal float point comparison
Product: clang
Version: trunk
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
Assignee: kremenek at apple.com
Reporter: spam at drgonzo.nl
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Analyzing the following program using the pre-built 'checker-276' available for
Mac OS X causes an assertion failure (Mac OS X 10.6.8 on a MacBook 1,1):
int main() {
float a = 0.5f;
float b = (0.05 > a) ? 0.0f : 1.0f;
return 0;
}
The assertion failure is:
Assertion failed: (order < 0 && "illegal float comparison"), function
handleFloatConversion, file
/Volumes/Data/Users/kremenek/checker-build/checker-build/checker-276-src/tools/clang/lib/Sema/SemaExpr.cpp,
line 1057.
0 clang++ 0x0066dd04 PrintStackTraceSignalHandler(void*) + 36
1 clang++ 0x0066e180 SignalHandler(int) + 480
2 libSystem.B.dylib 0x99ca205b _sigtramp + 43
3 libSystem.B.dylib 0xffffffff _sigtramp + 1714806735
4 clang++ 0x0066da0b abort + 27
5 clang++ 0x0066d9f0 abort + 0
6 clang++ 0x01447f9a
clang::Sema::UsualArithmeticConversions(clang::ActionResult<clang::Expr*,
true>&, clang::ActionResult<clang::Expr*, true>&, bool) + 3546
7 clang++ 0x014667c7
clang::Sema::CheckCompareOperands(clang::ActionResult<clang::Expr*, true>&,
clang::ActionResult<clang::Expr*, true>&, clang::SourceLocation, unsigned int,
bool) + 5111
8 clang++ 0x0146c326
clang::Sema::CreateBuiltinBinOp(clang::SourceLocation,
clang::BinaryOperatorKind, clang::Expr*, clang::Expr*) + 1174
9 clang++ 0x0146eace clang::Sema::BuildBinOp(clang::Scope*,
clang::SourceLocation, clang::BinaryOperatorKind, clang::Expr*, clang::Expr*) +
1566
10 clang++ 0x01446fd6 clang::Sema::ActOnBinOp(clang::Scope*,
clang::SourceLocation, clang::tok::TokenKind, clang::Expr*, clang::Expr*) +
4534
11 clang++ 0x01135ff4
clang::Parser::ParseRHSOfBinaryExpression(clang::ActionResult<clang::Expr*,
true>, clang::prec::Level) + 4948
12 clang++ 0x01134c7b
clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) + 203
13 clang++ 0x01140018
clang::Parser::ParseParenExpression(clang::Parser::ParenParseOption&, bool,
bool, clang::OpaquePtr<clang::QualType>&, clang::SourceLocation&) + 3000
14 clang++ 0x011396af clang::Parser::ParseCastExpression(bool, bool,
bool&, clang::Parser::TypeCastState) + 4063
15 clang++ 0x01134c2d
clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) + 125
16 clang++ 0x0111875a
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&) + 3482
17 clang++ 0x011169b5
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 1733
18 clang++ 0x0110fb7f
clang::Parser::ParseSimpleDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&,
unsigned int, clang::SourceLocation&,
clang::Parser::ParsedAttributesWithRange&, bool, clang::Parser::ForRangeInit*)
+ 735
19 clang++ 0x0110f6a3
clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned
int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 1059
20 clang++ 0x01168409
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&)
+ 6841
21 clang++ 0x01166896
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 214
22 clang++ 0x011700a9 clang::Parser::ParseCompoundStatementBody(bool)
+ 2185
23 clang++ 0x0117181b
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 187
24 clang++ 0x011833db
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) +
4859
25 clang++ 0x0111689e
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 1454
26 clang++ 0x01181ab4
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 1044
27 clang++ 0x0118129d
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 285
28 clang++ 0x0117ff66
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 4662
29 clang++ 0x0117ec59
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 521
30 clang++ 0x011024a7 clang::ParseAST(clang::Sema&, bool, bool) +
7111
31 clang++ 0x008a4b11 clang::ASTFrontendAction::ExecuteAction() + 145
32 clang++ 0x008a43d8 clang::FrontendAction::Execute() + 104
33 clang++ 0x008788df
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 943
34 clang++ 0x008d3231
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 7953
35 clang++ 0x00006011 main + 8129
36 clang++ 0x00003535 start + 53
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140404/de646479/attachment.html>
More information about the llvm-bugs
mailing list