Mark Dickinson <[email protected]> added the comment:
Okay---this one I *can* reproduce. :)
I'm going to call it a gcc optimization bug. Specifically, it seems to be a
bug involving gcc's builtin version of the copysign function.
When I build a current svn trunk checkout (r82245) with:
CC='gcc-4.4 -m64' ./configure && make
I get the wrong result:
Python 2.7rc2+ (trunk:82245, Jun 26 2010, 05:35:07)
[GCC 4.4.4] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> (-0.0).hex()
'0x0.0p+0'
But when building with either:
CC='gcc-4.4 -m64 -fno-builtin-copysign' ./configure && make
or
CC='gcc-4.4 -m64' ./configure --with-pydebug && make
I get the expected results. If I have time I'll investigate further and see if
I can generate the bug from smaller code. At any rate, I don't think this is
something that can sensibly be fixed in Python itself, so I think this issue
should be closed, and a bug filed upstream if necessary.
I also can't see a good reason why this bug would be specific to OpenSolaris.
Does anyone have gcc-4.4.4 available to test this on OS X, Linux or *BSD?
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue9069>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com