tep%suntan.West@sun.com (Tom Perrine x426) (05/16/89)
I noticed this in gnu.gcc.bug, and thought people would be interested. From: !mcgrath@tully.Berkeley.EDU (Roland McGrath) Newsgroups: gnu.gcc.bug Subject: gcc 1.35 fixunsdfsi doesn't work on Sun 3 (68020) Date: 14 May 89 11:49:54 GMT There is a bug in the Sun 3 C compiler such that under -O, the `__fixunsdfsi' function in gnulib gets done wrong. Without -O, it compiles to: link a6, #0 movel a6@(8), d0 movel a6@(12), d1 jsr Fund unlk a6 rts With -O, it becomes: link a6, #0 jsr Fund unlk a6 rts which doesn't work. The bottom line is that unless you compile gnulib without -O, casting a double to an unsigned int won't work (it will always come out zero).