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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [930930-2.c] - Blame information for rev 688

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 688 jeremybenn
int
2
test_endianness()
3
{
4
  union doubleword
5
    {
6
      double d;
7
      unsigned long u[2];
8
    } dw;
9
  dw.d = 10;
10
  return dw.u[0] != 0 ? 1 : 0;
11
}
12
 
13
int
14
test_endianness_vol()
15
{
16
  union doubleword
17
    {
18
      volatile double d;
19
      volatile long u[2];
20
    } dw;
21
  dw.d = 10;
22
  return dw.u[0] != 0 ? 1 : 0;
23
}
24
 
25
main ()
26
{
27
  if (test_endianness () != test_endianness_vol ())
28
    abort ();
29
  exit (0);
30
}

powered by: WebSVN 2.1.0

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