What is wrong with Bugzilla? [Was: Re: GCC and Floating-Point]
Joseph S. Myers
joseph@codesourcery.com
Sun May 29 20:13:00 GMT 2005
On Sun, 29 May 2005, Giovanni Bajo wrote:
> You are mistaken, we think GCC isn't buggy about 323 because the C/C++
> standards do not tell us to do better than this. If you have higher
> expectations about floating point and C/C++, you should file a bugreport
> against the C/C++ standards.
This is ignoring that there are specific requirements in the C99 standard
regarding the handling of excess precision which we do not implement, even
with -ffloat-store, which are genuine bugs. Assignment, casts and
function call and return must discard excess precision, but we do not
discard excess precision on a cast of an expression to its own type.
Furthermore, the definition of FLT_EVAL_METHOD for i386
#define TARGET_FLT_EVAL_METHOD \
(TARGET_MIX_SSE_I387 ? -1 : TARGET_SSE_MATH ? 0 : 2)
is wrong when it is 2 because the way the i386 back end pretends to have
float and double (not just long double) 387 operations means that
precision may get randomly reduced if an intermediate value is spilled (so
-1, not 2, is correct). It is also incorrect because it is an assertion
about both arithmetic and evaluation of constants and we do not emulate
excess precision when evaluating constants and doing arithmetic on them.
Many of the issues reported in 323 or duplicates may be problems of user
expectations or problems that -ffloat-store fixes, but there are still
these subsets which are genuine bugs.
--
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
jsm@polyomino.org.uk (personal mail)
joseph@codesourcery.com (CodeSourcery mail)
jsm28@gcc.gnu.org (Bugzilla assignments and CCs)
More information about the Gcc
mailing list