1 /* PR tree-optimization/79737 */ 2 3 #if __SIZEOF_INT__ < 4 4 __extension__ typedef __INT32_TYPE__ int32_t; 5 #else 6 typedef int int32_t; 7 #endif 8 9 #pragma pack(1) 10 struct S 11 { 12 int32_t b:18; 13 int32_t c:1; 14 int32_t d:24; 15 int32_t e:15; 16 int32_t f:14; 17 } i, j; 18 19 void foo()20foo () 21 { 22 i.e = 0; 23 i.b = 5; 24 i.c = 0; 25 i.d = -5; 26 i.f = 5; 27 } 28 29 void bar()30bar () 31 { 32 j.b = 5; 33 j.c = 0; 34 j.d = -5; 35 j.e = 0; 36 j.f = 5; 37 } 38 39 int main()40main () 41 { 42 foo (); 43 bar (); 44 asm volatile ("" : : : "memory"); 45 if (i.b != j.b || i.c != j.c || i.d != j.d || i.e != j.e || i.f != j.f) 46 __builtin_abort (); 47 } 48