* gcc.dg/const-elim-1.c: Remove xfail for xtensa-*-*.
[official-gcc.git] / gcc / testsuite / gcc.dg / bf-ms-attrib.c
blobe3832d4b4046c968e987452985c4112cf0ff7391
1 /* bf-ms-attrib.c */
2 /* Adapted from Donn Terry <donnte@microsoft.com> testcase
3 posted to GCC-patches
4 http://gcc.gnu.org/ml/gcc-patches/2000-08/msg00577.html */
6 /* { dg-do run { target *-*-interix* *-*-mingw* *-*-cygwin* } } */
8 /* We don't want the default "pedantic-errors" in this case, since we're
9 testing nonstandard stuff to begin with. */
10 /* { dg-options "-ansi" } */
12 extern void abort(void);
14 struct one_gcc {
15 int d;
16 unsigned char a;
17 unsigned short b:7;
18 char c;
19 } __attribute__((__gcc_struct__)) ;
22 struct one_ms {
23 int d;
24 unsigned char a;
25 unsigned short b:7;
26 char c;
27 } __attribute__((__ms_struct__));
30 main()
32 /* As long as the sizes are as expected, we know attributes are working.
33 bf-ms-layout.c makes sure the right thing happens when the attribute
34 is on. */
35 if (sizeof(struct one_ms) != 12)
36 abort();
37 if (sizeof(struct one_gcc) != 8)
38 abort();