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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20020619-1.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 688 jeremybenn
#if (__SIZEOF_INT__ == 4)
2
typedef int int32;
3
#elif (__SIZEOF_LONG__ == 4)
4
typedef long int32;
5
#else
6
#error Add target support for int32
7
#endif
8
static int32 ref(void)
9
{
10
  union {
11
    char c[5];
12
    int32 i;
13
  } u;
14
 
15
  __builtin_memset (&u, 0, sizeof(u));
16
  u.c[0] = 1;
17
  u.c[1] = 2;
18
  u.c[2] = 3;
19
  u.c[3] = 4;
20
 
21
  return u.i;
22
}
23
 
24
int main()
25
{
26
  int32 b = ref();
27
  if (b != 0x01020304
28
      && b != 0x04030201)
29
    abort ();
30
  return 0;
31
}

powered by: WebSVN 2.1.0

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