tags 318959 -unreproducible tags 318959 -moreinfo tags 318959 +confirmed severity 318959 important retitle 318959 gcc-4.0 gives wrong results for lround thanks
At Mon, 25 Jul 2005 11:37:59 +0200, [EMAIL PROTECTED] wrote: > - Undefined behaviour is very likely to depend on compiler optimization > options, and that explains the "mysterious behaviour" previously > reported. Probably with '-O1' and above the compiler skips the > computation at all, and places 0. Thanks for your following up, you're absolutely right. I confirmed the problem. We'll put new glibc 2.3.5 soon, so I downgrade it to important, but I'll check it. > - I don't know how uint32_t are aligned and operated on in powerpc/64 > archs, but maybe different alignment (and different "undefined > behaviour") is the reason why Paul could not reproduce the bug. > BTW, what arch did you run your tests on, GOTO? > > I don't know ieee754, so I don't dare submit a patch to libc (e.g., if > (52 - j0) > 31, use 0), but I believe dropping this bug as unreproducible > would be a mistake. Better downgrade it and forward upstream. It reminds > me of the fdiv bug in early pentiums. I tested it on *ppc* because I didn't read the ex-reassigned messages. Actually ppc uses the different lround function. Regards, -- gotom -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]