Daniel Dunbar | ec1bee9 | 2010-06-29 16:52:18 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -verify %s |
Daniel Dunbar | 9c84d4a | 2010-05-27 18:42:17 +0000 | [diff] [blame] | 2 | |
| 3 | #pragma pack(push, 1) |
| 4 | struct s0 { |
| 5 | char f0; |
| 6 | int f1 __attribute__((aligned(4))); |
| 7 | }; |
| 8 | extern int a[sizeof(struct s0) == 5 ? 1 : -1]; |
| 9 | #pragma pack(pop) |
| 10 | |
| 11 | struct __attribute__((packed)) s1 { |
| 12 | char f0; |
| 13 | int f1 __attribute__((aligned(4))); |
| 14 | }; |
| 15 | extern int a[sizeof(struct s1) == 8 ? 1 : -1]; |
| 16 | |
| 17 | #pragma options align=packed |
| 18 | struct s2 { |
| 19 | char f0; |
| 20 | int f1 __attribute__((aligned(4))); |
| 21 | }; |
| 22 | extern int a[sizeof(struct s2) == 5 ? 1 : -1]; |
| 23 | #pragma options align=reset |