Devang Patel | 3137f12 | 2007-09-28 23:54:26 +0000 | [diff] [blame] | 1 | // RUN: %llvmgcc %s -S -o - |
Matthijs Kooijman | 2035efd | 2008-06-13 16:52:35 +0000 | [diff] [blame^] | 2 | // XFAIL: * |
| 3 | // See PR2425 |
| 4 | |
Devang Patel | 3137f12 | 2007-09-28 23:54:26 +0000 | [diff] [blame] | 5 | #pragma pack(push, 2) |
| 6 | struct 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 | |
| 20 | struct E { |
| 21 | unsigned long f1; |
| 22 | unsigned long f2; |
| 23 | }; |
| 24 | |
| 25 | typedef long (*FuncPtr) (); |
| 26 | |
| 27 | extern long bork(FuncPtr handler, const struct E *list); |
| 28 | |
| 29 | static long hndlr() |
| 30 | { |
| 31 | struct H cmd = { 4, 'fart' }; |
| 32 | return 0; |
| 33 | } |
| 34 | void foo(void *inWindow) { |
| 35 | static const struct E events[] = { |
| 36 | { 'cmds', 1 } |
| 37 | }; |
| 38 | bork(hndlr, events); |
| 39 | } |
| 40 | |