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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [attr-ms_struct-packed1.c] - Blame information for rev 816

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

Line No. Rev Author Line
1 298 jeremybenn
/* Test for MS structure with packed attribute.  */
2
/* { dg-do run { target *-*-interix* *-*-mingw* *-*-cygwin* i?86-*-darwin* } }
3
/* { dg-options "-std=gnu99" } */
4
 
5
extern void abort ();
6
 
7
union u
8
{
9
  int a;
10
} __attribute__((__ms_struct__, __packed__));
11
 
12
struct s
13
{
14
  char c;
15
  union u u;
16
};
17
 
18
int
19
main (void)
20
{
21
  if (sizeof (struct s) != (sizeof (char) + sizeof (union u)))
22
    abort ();
23
 
24
  return 0;
25
}

powered by: WebSVN 2.1.0

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