1*67e74705SXin Li // RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -verify %s 2*67e74705SXin Li // expected-no-diagnostics 3*67e74705SXin Li 4*67e74705SXin Li #pragma pack(push, 1) 5*67e74705SXin Li struct s0 { 6*67e74705SXin Li char f0; 7*67e74705SXin Li int f1 __attribute__((aligned(4))); 8*67e74705SXin Li }; 9*67e74705SXin Li extern int a[sizeof(struct s0) == 5 ? 1 : -1]; 10*67e74705SXin Li #pragma pack(pop) 11*67e74705SXin Li 12*67e74705SXin Li struct __attribute__((packed)) s1 { 13*67e74705SXin Li char f0; 14*67e74705SXin Li int f1 __attribute__((aligned(4))); 15*67e74705SXin Li }; 16*67e74705SXin Li extern int a[sizeof(struct s1) == 8 ? 1 : -1]; 17*67e74705SXin Li 18*67e74705SXin Li #pragma options align=packed 19*67e74705SXin Li struct s2 { 20*67e74705SXin Li char f0; 21*67e74705SXin Li int f1 __attribute__((aligned(4))); 22*67e74705SXin Li }; 23*67e74705SXin Li extern int a[sizeof(struct s2) == 5 ? 1 : -1]; 24*67e74705SXin Li #pragma options align=reset 25*67e74705SXin Li 26*67e74705SXin Li #pragma pack(1) 27*67e74705SXin Li struct s3_0 { unsigned char f0; unsigned int f1; }; 28*67e74705SXin Li int t3_0[sizeof(struct s3_0) == 5 ? 1 : -1]; 29*67e74705SXin Li #pragma options align=reset 30*67e74705SXin Li struct s3_1 { unsigned char f0; unsigned int f1; }; 31*67e74705SXin Li int t3_1[sizeof(struct s3_1) == 8 ? 1 : -1]; 32