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/] [minuszero.c] - Blame information for rev 823

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

Line No. Rev Author Line
1 149 jeremybenn
main ()
2
{
3
  union
4
    {
5
      double d;
6
      unsigned short i[sizeof (double) / sizeof (short)];
7
    } u;
8
  int a = 0;
9
  int b = -5;
10
  int j;
11
 
12
  u.d = (double) a / b;
13
 
14
  /* Look for the right pattern, but be sloppy since
15
     we don't know the byte order.  */
16
  for (j = 0; j < sizeof (double) / sizeof (short); j++)
17
    {
18
      if (u.i[j] == 0x8000)
19
        exit (0);
20
    }
21
  abort ();
22
}

powered by: WebSVN 2.1.0

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