1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
struct s { int i[18]; char f; char b[2]; }; struct s s1; int main() { struct s s2; s2.b[0] = 100; __builtin_memcpy(&s2, &s1, ((unsigned int) &((struct s *)0)->b)); if (s2.b[0] != 100) abort(); exit(0); }