2007-03-01 Paul Brook <paul@codesourcery.com>
[official-gcc.git] / gcc / testsuite / objc.dg / encode-8.m
blob947a92974a275163ace7ca0005722a5eed4e1242
1 /* { dg-options "-fgnu-runtime" } */
2 /* { dg-do run } */
4 #include <objc/encoding.h>
5 #include <stdlib.h>
7 union f
9   char i;
10   double f1;
11   short t;
14 union g
16   int i;
20 int main(void)
22   if (objc_sizeof_type (@encode (union f)) != sizeof(union f))
23    abort ();
24   if (objc_alignof_type (@encode (union f)) != __alignof__(union f))
25    abort ();
26   if (objc_sizeof_type (@encode (union g)) != sizeof(union g))
27    abort ();
28   if (objc_alignof_type (@encode (union g)) != __alignof__(union g))
29    abort ();
30   return 0;