|
From: | Paul Eggert |
Subject: | Re: Strange problems with data-tests.el |
Date: | Sun, 12 Aug 2018 15:43:14 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
Eli Zaretskii wrote:
This all looks like a compiler bug
Yes and no. In this area, GCC deliberately doesn't conform to the C standard unless you use an option like -fexcess-precision=standard that causes GCC to conform but often generate worse code.
The odd results you observed can occur when a C 'double' variable spontaneously changes value, e.g., when an 80-bit floating-point register is spilled to a 64-bit memory location. I reproduced the problem on Fedora 28 and fixed it by installing the attached patch into master; please give it a try.
I suspect that it's only bad luck that exposed the problem, that is, that the recent bignum or misc changes triggered the bug only because they caused GCC to optimize in a different way. In theory if we're unlucky the bug could recur, since GCC doesn't make promises in this area. However, I changed arithcompare in such a way that GCC would have to be pretty perverse to cause the problem to resurface, and similarly for other C compilers.
0001-Port-better-to-x86-fexcess-precision-fast.patch
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |