blob: 79f48ceaeeae0daeae4ea7911a68830d336163a7 [file] [log] [blame]
Devang Patel3137f122007-09-28 23:54:26 +00001// RUN: %llvmgcc %s -S -o -
Matthijs Kooijman2035efd2008-06-13 16:52:35 +00002
Devang Patel3137f122007-09-28 23:54:26 +00003#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{
Chris Lattner6fb4fea2008-06-20 05:28:56 +000029 struct H cmd = { 4, 412 };
Devang Patel3137f122007-09-28 23:54:26 +000030 return 0;
31}
32void foo(void *inWindow) {
33 static const struct E events[] = {
Chris Lattner6fb4fea2008-06-20 05:28:56 +000034 { 123124, 1 }
Devang Patel3137f122007-09-28 23:54:26 +000035 };
36 bork(hndlr, events);
37}
38