This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: testsuite fixes for small doubles
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 24 Apr 2009 09:00:19 +0000 (UTC)
- Subject: Re: testsuite fixes for small doubles
- References: <200904240034.n3O0Y1Ce005872@greed.delorie.com>
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 copy)
> @@ -10,9 +10,12 @@ int
> main (void)
> {
> TEST_I_F(signed char, unsigned char, long double, LDBL_MANT_DIG);
> TEST_I_F(signed short, unsigned short, long double, LDBL_MANT_DIG);
> TEST_I_F(signed int, unsigned int, long double, LDBL_MANT_DIG);
> TEST_I_F(signed long, unsigned long, long double, LDBL_MANT_DIG);
> - TEST_I_F(signed long long, unsigned long long, long double, LDBL_MANT_DIG);
> + if (sizeof(long double) > sizeof(long long))
> + {
> + TEST_I_F(signed long long, unsigned long long, long double, LDBL_MANT_DIG);
> + }
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. Note that there are tests of conversion between long long and
float (and between TImode and float where TImode is supported). The only
case these tests don't handle is inexact conversions to/from non-IEEE
types (IBM long double), hence the conditional in fp-int-convert-timode.c
on LDBL_MANT_DIG != 106.
--
Joseph S. Myers
joseph@codesourcery.com