blob: f0183063ddbfcb470cc7259f5a261c5bc441bc65 [file] [log] [blame]
Eric Christopher3883e662011-07-26 22:17:02 +00001// RUN: %clang_cc1 %s -emit-llvm -o -
2
3#pragma pack(push, 2)
4struct H {
5 unsigned long f1;
6 unsigned long f2;
7 union {
8 struct opaque1 *f3;
9 struct opaque2 *f4;
10 struct {
11 struct opaque3 *f5;
12 unsigned short f6;
13 } f7;
14 } f8;
15};
16#pragma pack(pop)
17
18struct E {
19 unsigned long f1;
20 unsigned long f2;
21};
22
23typedef long (*FuncPtr) ();
24
25extern long bork(FuncPtr handler, const struct E *list);
26
27static long hndlr()
28{
29 struct H cmd = { 4, 412 };
Richard Smith2d6a5672012-01-14 04:30:29 +000030 struct H cmd2 = { 4, 412, 0 };
Eric Christopher3883e662011-07-26 22:17:02 +000031 return 0;
32}
33void foo(void *inWindow) {
34 static const struct E events[] = {
35 { 123124, 1 }
36 };
37 bork(hndlr, events);
38}