Re: testsuite fixes for small doubles

2009-04-27 Thread Janis Johnson
On Thu, 2009-04-23 at 20:34 -0400, DJ Delorie wrote: SH (and I'm sure others) has some multilibs (like -m2a-single-only) where sizeof(double) is 4, which breaks some testcases. Here's a patch which adds checks for small doubles (and small long doubles), and adjusts some of the tests which

Re: testsuite fixes for small doubles

2009-04-27 Thread DJ Delorie
On Thu, 2009-04-23 at 20:34 -0400, DJ Delorie wrote: SH (and I'm sure others) has some multilibs (like -m2a-single-only) where sizeof(double) is 4, which breaks some testcases. Here's a patch which adds checks for small doubles (and small long doubles), and adjusts some of the tests

Re: testsuite fixes for small doubles

2009-04-24 Thread Joseph S. Myers
On Thu, 23 Apr 2009, DJ Delorie wrote: Index: gcc.dg/torture/fp-int-convert-long-double.c === --- gcc.dg/torture/fp-int-convert-long-double.c (revision 146652) +++ gcc.dg/torture/fp-int-convert-long-double.c (working

Re: testsuite fixes for small doubles

2009-04-24 Thread DJ Delorie
The fp-int-convert-long-double test does this: static volatile signed long long ivin, ivout; static volatile long double fv1, fv2; ivin = ((signed long long) (((unsigned long long) ~(unsigned long long) 0) 1)); fv1 = ((signed long long) (((unsigned long long) ~(unsigned long long) 0)

Re: testsuite fixes for small doubles

2009-04-24 Thread Joseph S. Myers
On Fri, 24 Apr 2009, DJ Delorie wrote: The fp-int-convert-long-double test does this: static volatile signed long long ivin, ivout; static volatile long double fv1, fv2; ivin = ((signed long long) (((unsigned long long) ~(unsigned long long) 0) 1)); fv1 = ((signed long long)

Re: testsuite fixes for small doubles

2009-04-24 Thread DJ Delorie
But it doesn't need to store it *exactly*; it only tests that the conversion reverses if PREC_OK (argument to TEST_I_F_VAL) is true, and TEST_I_F sets PREC_OK to what should be an appropriate value (based on the types involved, LDBL_MANT_DIG, etc.) in each case. The other tests are

Re: testsuite fixes for small doubles

2009-04-24 Thread DJ Delorie
The fp-int-convert tests are meant to be correct independent of the sizes involved, so this change is inappropriate and may point to a bug elsewhere. It did, I fixed it. Thanks for the insight.

testsuite fixes for small doubles

2009-04-23 Thread DJ Delorie
SH (and I'm sure others) has some multilibs (like -m2a-single-only) where sizeof(double) is 4, which breaks some testcases. Here's a patch which adds checks for small doubles (and small long doubles), and adjusts some of the tests which depend on large doubles. Comments? Ok to apply?

Re: testsuite fixes for small doubles

2009-04-23 Thread Kaveh R. GHAZI
On Thu, 23 Apr 2009, DJ Delorie wrote: +# Return 1 if the target supports double larger than float, +# 0 otherwise. + +proc check_effective_target_large_double { } { +return [check_no_compiler_messages large_double object { + int dummy[sizeof(double) sizeof(float) ? 1 : -1]; +

Re: testsuite fixes for small doubles

2009-04-23 Thread DJ Delorie
On Thu, 23 Apr 2009, DJ Delorie wrote: +# Return 1 if the target supports double larger than float, +# 0 otherwise. + +proc check_effective_target_large_double { } { +return [check_no_compiler_messages large_double object { + int dummy[sizeof(double) sizeof(float) ? 1 : -1];