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]

Re: [PATCH] pa-RISC correct conversion (long double -> unsigned int)


Jeffrey A Law wrote:
> 
>   In message <3A93CE34.186495C9@redhat.com>you write:
>   > I have an regression test where is the preferred place to install it,
>   > gcc/gcc/testsuite/gcc.c-torture/execute? -Will
> Yes, that sounds like the right location.
> 
> jeff

The attached file is the test and below is the change log entry.  Okay
to install in gcc/gcc/testsuite/gcc.c-torture/execute?

-Will

2001-02-26  Will Cohen  <wcohen@redhat.com>

	* gcc.c-torture/execute/20010226-1.c: New test.
#include <stdio.h>

long double dfrom = 1.1;
long double m1;
long double m2;
unsigned long mant_long;

int main( )
{
  m1 = dfrom / 2.0;

  m2 = m1 * 4294967296.0;
  mant_long = ((unsigned long) m2) & 0xffffffff;

  if ( mant_long == 0x8ccccccc)
    exit (0);
  else
    abort();
}

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