2014-08-04 Ed Schonberg <schonberg@adacore.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / attr-ms_struct-packed1.c
blobd885c6ff30685a2871a070d1fe76ebcc5dcced85
1 /* Test for MS structure with packed attribute. */
2 /* { dg-do run { target *-*-interix* *-*-mingw* *-*-cygwin* i?86-*-darwin* } }
3 /* { dg-options "-std=gnu99" } */
5 extern void abort ();
7 union u
9 int a;
10 } __attribute__((__ms_struct__, __packed__));
12 struct s
14 char c;
15 union u u;
18 int
19 main (void)
21 if (sizeof (struct s) != (sizeof (char) + sizeof (union u)))
22 abort ();
24 return 0;