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/] [bf-pack-1.c] - Blame information for rev 414

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

Line No. Rev Author Line
1 297 jeremybenn
struct foo
2
{
3
  unsigned half:16;
4
  unsigned long whole:32 __attribute__ ((packed));
5
};
6
 
7
f (struct foo *q)
8
{
9
  if (q->half != 0x1234)
10
    abort ();
11
  if (q->whole != 0x56789abcL)
12
    abort ();
13
}
14
 
15
main ()
16
{
17
  struct foo bar;
18
 
19
  bar.half = 0x1234;
20
  bar.whole = 0x56789abcL;
21
  f (&bar);
22
  exit (0);
23
}

powered by: WebSVN 2.1.0

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