PR target/84336
[official-gcc.git] / gcc / testsuite / objc.dg / encode-8.m
bloba10e4e9663a9488adbcee7ea82876a56108bdf47
1 /* { dg-do run } */
2 /* { dg-skip-if "" { *-*-* } { "-fnext-runtime" } { "" } } */
4 #include <objc/runtime.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;