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

Subversion Repositories openrisc_me

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
   unsigned long bad(int reg, unsigned long inWord)
2
   {
3
       union {
4
           unsigned long word;
5
           unsigned char byte[4];
6
       } data;
7
 
8
       data.word = inWord;
9
       data.byte[reg] = 0;
10
 
11
       return data.word;
12
   }
13
 
14
main()
15
{
16
  /* XXX This test could be generalized.  */
17
  if (sizeof (long) != 4)
18
    exit (0);
19
 
20
  if (bad (0, 0xdeadbeef) == 0xdeadbeef)
21
    abort ();
22
  exit (0);
23
}

powered by: WebSVN 2.1.0

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