This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

moving 20010114-2.c to ieee directory


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]