1 // RUN: %llvmgcc -O3 -S -o - %s | grep {18} 2 3 #include <stdint.h> 4 5 #pragma pack(push, 1) 6 typedef struct 7 { 8 uint32_t a; 9 } foo; 10 11 typedef struct { 12 uint8_t major; 13 uint8_t minor; 14 uint16_t build; 15 } VERSION; 16 17 typedef struct { 18 uint8_t a[5]; 19 VERSION version; 20 uint8_t b; 21 foo d; 22 uint32_t guard; 23 } bar; 24 #pragma pack(pop) 25 26 barsize(void)27unsigned barsize(void) { 28 return sizeof(bar); 29 } 30 31