execute/20010114-2.c not a bug.

Geoff Keating geoffk@geoffk.org
Sun Jun 3 14:03:00 GMT 2001


Stephen L Moshier <moshier@mediaone.net> writes:

> > FAIL: gcc.c-torture/execute/20010114-2.c execution,  -O1
> 
> This test case is just an extra-precise fpu register effect.
> 
> With TWO23 = 8388608  and x = -1.5 it first calculates
>           x = TWO23 - x;
> This is  8388608 + 1.5 = 8388609.5
> which would round to 8388610.0 in single precision.
> Next it calculates
>           x = -(x - TWO23);
> which with single precision rounding would be  -(8388610. - 8388608.) = -2.0
> as desired.
> 
> With the fpu set to long double rounding, the result is
>   -(8388609.5 - 8388608.) = -1.5
> as not desired.
> 
> This test case should either be deleted or moved to the IEEE area.
> I would vote to delete it.

It should be in the IEEE area.  Unfortunately, all IEEE tests are
compiled with -ffloat-store, which hides the original bug (visible on
powerpc).

So, my plan has three steps:

1. Change dejagnu so that on x86 systems IEEE tests are run with
   -ffloat-store.

2. Change the GCC testsuite so that -ffloat-store is not used on IEEE
   tests by default.

3. Move this testcase.

At present, I've sent in the patch for (1) and it is awaiting approval.

-- 
- Geoffrey Keating <geoffk@geoffk.org>



More information about the Gcc-bugs mailing list