execute/20010114-2.c not a bug.
Stephen L Moshier
moshier@mediaone.net
Sun Jun 3 13:57:00 GMT 2001
> 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.
More information about the Gcc-bugs
mailing list