[LLVMbugs] [Bug 1489] NEW: miscompilation of a simple c file (X86)
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Sat Jun 2 18:40:35 PDT 2007
http://llvm.org/bugs/show_bug.cgi?id=1489
Summary: miscompilation of a simple c file (X86)
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: lauro.venancio at gmail.com
llvm-gcc is miscompiling the following c code:
------------------------------------------------------
#define _ISOC9X_SOURCE 1
#include <math.h>
int main( void ) { return (lrintf(3.999f) > 0)?0:1; }
-------------------------------------------------------
laurov at laurov-laptop:/tmp$ gcc test.c -o test -lm
laurov at laurov-laptop:/tmp$ ./test
laurov at laurov-laptop:/tmp$ echo $?
0
laurov at laurov-laptop:/tmp$ llvm-gcc test.c -o test -lm
laurov at laurov-laptop:/tmp$ ./test
laurov at laurov-laptop:/tmp$ echo $?
1
To reproduce this bug with llc must be used "llc -disable-fp-elim -fast -mcpu=i486".
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the llvm-bugs
mailing list