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
jos...@codesourcery.com

Reply via email to