aboutsummaryrefslogtreecommitdiff
path: root/SingleSource/UnitTests/ms_struct_pack_layout-1.c
blob: 38d308b7acc2345b3ff74a967bfd60352668bfc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
extern void abort ();

union u
{
  int a;
} __attribute__((__ms_struct__, __packed__));

struct s
{
  char c;
  union u u;
};

int main (void)
{
  if (sizeof (struct s) != (sizeof (char) + sizeof (union u))) 
    abort ();

  return 0;
}