1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -emit-llvm %s -o - 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuc #ifdef PACKED 4*f4a2713aSLionel Sambuc #define P __attribute__((packed)) 5*f4a2713aSLionel Sambuc #else 6*f4a2713aSLionel Sambuc #define P 7*f4a2713aSLionel Sambuc #endif 8*f4a2713aSLionel Sambuc 9*f4a2713aSLionel Sambuc struct P M_Packed { 10*f4a2713aSLionel Sambuc unsigned long sorted : 1; 11*f4a2713aSLionel Sambuc unsigned long from_array : 1; 12*f4a2713aSLionel Sambuc unsigned long mixed_encoding : 1; 13*f4a2713aSLionel Sambuc unsigned long encoding : 8; 14*f4a2713aSLionel Sambuc unsigned long count : 21; 15*f4a2713aSLionel Sambuc 16*f4a2713aSLionel Sambuc }; 17*f4a2713aSLionel Sambuc 18*f4a2713aSLionel Sambuc struct M_Packed sM_Packed; 19*f4a2713aSLionel Sambuc testM_Packed(void)20*f4a2713aSLionel Sambucint testM_Packed (void) { 21*f4a2713aSLionel Sambuc struct M_Packed x; 22*f4a2713aSLionel Sambuc return (x.count != 0); 23*f4a2713aSLionel Sambuc } 24