| | | | --- | --- | | Bugzilla Link | [1489](https://llvm.org/bz1489) | | Resolution | FIXED | | Resolved on | Feb 22, 2010 12:41 | | Version | 1.0 | | OS | Linux | | Reporter | LLVM Bugzilla Contributor | ## Extended Description 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@laurov-laptop:/tmp$ gcc test.c -o test -lm laurov@laurov-laptop:/tmp$ ./test laurov@laurov-laptop:/tmp$ echo $? 0 laurov@laurov-laptop:/tmp$ llvm-gcc test.c -o test -lm laurov@laurov-laptop:/tmp$ ./test laurov@laurov-laptop:/tmp$ echo $? 1 To reproduce this bug with llc must be used "llc -disable-fp-elim -fast -mcpu=i486".