Description of problem: GCC internal compiler error Version-Release number of selected component (if applicable): gcc-4.1.0-3 glibc-headers-2.4-4 How reproducible: completely Steps to Reproduce: 1. save attached code to foo.c 2. compile with "gcc -O2 -c foo.c" on a 32-bit platform Actual results: Failure to produce .o file. Instead, error report: /tmp/foo.c: In function 'main': /tmp/foo.c:9: internal compiler error: in get_callee_fndecl, at tree.c:5846 Expected results: production of object file. Additional info: This bug is dependent on several things: 1. If optimisation is turned off, the bug disappears. 2. The bug occurs if (and only if) the (unsigned) integer constant has its high bit set. 3. If the call to 'floor' is replaced with a call to foo, with prototype "double foo(double d);", the bug disappears. Perhaps the bug is related to some internal floor() implementation.
Created attachment 129220 [details] Example code that triggers internal compiler error
Comment on attachment 129220 [details] Example code that triggers internal compiler error #include<math.h> int main(int argc, char **argv) { double d; unsigned int i = 0x80000000; d = i; i = (unsigned int)floor(d); return i; }
This is fixed in gcc-4.1.0-15.fc5 (currently FC5 testing updates).