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/] [struct-ret-2.c] - Blame information for rev 298

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

Line No. Rev Author Line
1 297 jeremybenn
typedef struct
2
{
3
  unsigned char a __attribute__ ((packed));
4
  unsigned short b __attribute__ ((packed));
5
} three_byte_t;
6
 
7
unsigned char
8
f (void)
9
{
10
  return 0xab;
11
}
12
 
13
unsigned short
14
g (void)
15
{
16
  return 0x1234;
17
}
18
 
19
main ()
20
{
21
  three_byte_t three_byte;
22
 
23
  three_byte.a = f ();
24
  three_byte.b = g ();
25
  if (three_byte.a != 0xab || three_byte.b != 0x1234)
26
    abort ();
27
  exit (0);
28
}
29
 

powered by: WebSVN 2.1.0

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