blob: be244d5d4e432188a78943ffd23ebfbe6c16cb20 [file] [log] [blame]
Devang Patel3137f122007-09-28 23:54:26 +00001// RUN: %llvmgcc %s -S -o -
Matthijs Kooijman2035efd2008-06-13 16:52:35 +00002// XFAIL: *
3// See PR2425
4
Devang Patel3137f122007-09-28 23:54:26 +00005#pragma pack(push, 2)
6struct H {
7 unsigned long f1;
8 unsigned long f2;
9 union {
10 struct opaque1 *f3;
11 struct opaque2 *f4;
12 struct {
13 struct opaque3 *f5;
14 unsigned short f6;
15 } f7;
16 } f8;
17};
18#pragma pack(pop)
19
20struct E {
21 unsigned long f1;
22 unsigned long f2;
23};
24
25typedef long (*FuncPtr) ();
26
27extern long bork(FuncPtr handler, const struct E *list);
28
29static long hndlr()
30{
31 struct H cmd = { 4, 'fart' };
32 return 0;
33}
34void foo(void *inWindow) {
35 static const struct E events[] = {
36 { 'cmds', 1 }
37 };
38 bork(hndlr, events);
39}
40