http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57003
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-23 09:51:23 UTC --- The important question is what that memcpy( buffer, DIR_Windows, len * sizeof(WCHAR) ); memcpy( buffer + len, default_syswow64W, sizeof(default_syswow64W) ); compiles to. If it is ... call memcpy leal (%rax, ...), %rdi ! or similar, the important is that buffer is preserved in return value of the previous memcpy call ... call memcpy Then if it doesn't work, you need to look at whatever memcpy implementation you are calling and see whether it correctly returns the first argument it has been passed to it in all cases.