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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [floatunsisf-1.c] - Blame information for rev 297

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

Line No. Rev Author Line
1 297 jeremybenn
/* The fp-bit.c function __floatunsisf had a latent bug where guard bits
2
   could be lost leading to incorrect rounding.  */
3
/* Origin: Joseph Myers <joseph@codesourcery.com> */
4
 
5
extern void abort (void);
6
extern void exit (int);
7
#if __INT_MAX__ >= 0x7fffffff
8
volatile unsigned u = 0x80000081;
9
#else
10
volatile unsigned long u = 0x80000081;
11
#endif
12
volatile float f1, f2;
13
int
14
main (void)
15
{
16
  f1 = (float) u;
17
  f2 = (float) 0x80000081;
18
  if (f1 != f2)
19
    abort ();
20
  exit (0);
21
}

powered by: WebSVN 2.1.0

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