1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
extern void abort (void); int test(int n) { struct s { char b[n]; } __attribute__((packed)); n++; return sizeof(struct s); } int main() { if (test(123) != 123) abort (); return 0; }