1/* { dg-do run } */
2/* { dg-skip-if "" { *-*-* } { "-fnext-runtime" } { "" } } */
3
4#include <objc/runtime.h>
5#include <stdlib.h>
6
7union f
8{
9  char i;
10  double f1;
11  short t;
12};
13
14union g
15{
16  int i;
17};
18
19
20int main(void)
21{
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;
31}
32