https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86738
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Reduced testcase: struct S { int s; }; unsigned char a[20]; void foo () { __builtin_memcpy (&a[15], &a[(unsigned) (__UINTPTR_TYPE__) &((S *) 0)->s], 2); // __builtin_memcpy (&a[15], &a[(unsigned) __builtin_offsetof (S, s)], 2); } You really should just use offsetof, instead of poor man's attempts at it. That said, g++ should not crash on it.