This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
moving 20010114-2.c to ieee directory
- To: gcc-patches at gcc dot gnu dot org
- Subject: moving 20010114-2.c to ieee directory
- From: Jan Hubicka <jh at suse dot cz>
- Date: Fri, 20 Jul 2001 16:17:25 +0200
Hi
The testcase
extern void exit (int);
extern void abort (void);
float
rintf (float x)
{
static const float TWO23 = 8388608.0;
if (__builtin_fabs (x) < TWO23)
{
if (x > 0.0)
{
x += TWO23;
x -= TWO23;
}
else if (x < 0.0)
{
x = TWO23 - x;
x = -(x - TWO23);
}
}
return x;
}
int main (void)
{
if (rintf (-1.5) != -2.0)
abort ();
exit (0);
}
Fails on i386, because it depends on the floats being really floats, not
long doubles. -ffloat-store solves the failure. Would be OK to move the
testcase to subdirectory ieee, where the flag is set?
Honza