xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/2009-06-18-StaticInitTailPadPack.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -emit-llvm -o -
2*f4a2713aSLionel Sambuc // rdar://6983634
3*f4a2713aSLionel Sambuc 
4*f4a2713aSLionel Sambuc   typedef struct A *Foo;
5*f4a2713aSLionel Sambuc #pragma pack(push, 2)
6*f4a2713aSLionel Sambuc   struct Bar {
7*f4a2713aSLionel Sambuc     Foo             f1;
8*f4a2713aSLionel Sambuc     unsigned short  f2;
9*f4a2713aSLionel Sambuc     float           f3;
10*f4a2713aSLionel Sambuc   };
11*f4a2713aSLionel Sambuc   struct Baz {
12*f4a2713aSLionel Sambuc     struct Bar   f1;
13*f4a2713aSLionel Sambuc     struct Bar   f2;
14*f4a2713aSLionel Sambuc   };
15*f4a2713aSLionel Sambuc   struct Qux {
16*f4a2713aSLionel Sambuc     unsigned long   f1;
17*f4a2713aSLionel Sambuc     struct Baz             f2;
18*f4a2713aSLionel Sambuc   };
19*f4a2713aSLionel Sambuc extern const struct Qux Bork;
20*f4a2713aSLionel Sambuc const struct Qux Bork = {
21*f4a2713aSLionel Sambuc   0,
22*f4a2713aSLionel Sambuc   {
23*f4a2713aSLionel Sambuc     {0},
24*f4a2713aSLionel Sambuc     {0}
25*f4a2713aSLionel Sambuc   }
26*f4a2713aSLionel Sambuc };
27