OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [ieee/] [rbug.c] - Blame information for rev 825

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
#if defined(__i386__) && defined(__FreeBSD__)
2
#include <ieeefp.h>
3
#endif
4
 
5
double d (unsigned long long k)
6
{
7
  double x;
8
 
9
  x = (double) k;
10
  return x;
11
}
12
 
13
float s (unsigned long long k)
14
{
15
  float x;
16
 
17
  x = (float) k;
18
  return x;
19
}
20
 
21
main ()
22
{
23
  unsigned long long int k;
24
  double x;
25
 
26
#if defined(__i386__) && defined(__FreeBSD__)
27
  /* This test case assumes extended-precision, but FreeBSD defaults to
28
     double-precision.  Make it so.  */
29
  fpsetprec (FP_PE);
30
#endif
31
 
32
  if (sizeof (double) >= 8)
33
    {
34
      k = 0x8693ba6d7d220401ULL;
35
      x = d (k);
36
      k = (unsigned long long) x;
37
      if (k != 0x8693ba6d7d220800ULL)
38
        abort ();
39
    }
40
 
41
  k = 0x8234508000000001ULL;
42
  x = s (k);
43
  k = (unsigned long long) x;
44
  if (k != 0x8234510000000000ULL)
45
    abort ();
46
 
47
  exit (0);
48
}
49
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.