This is the mail archive of the gcc@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]
Other format: [Raw text]

testcase question (portability)


Hi folks.

I'm thinking of adding this test, but I'm not sure it's 64-bit
portable, sane across all architectures, etc.  BTW, this is the
distilled testcase for the patch I just committed.

Cheers.
Aldy

#define IM 2147483648u

int main()
{
  int ival = 0x7ea4766d;

  ival = (int) ((float) ival * 43.999F / (float) IM);
  if (ival != 43)
    abort ();
  exit (0);
}


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